I'm having problems setting the Silverlight 4 MediaElement Source property in an ASP.NET MVC 2 application. I have a Windows 7 development machine and a Windows Server 2008 mid-tier server.
Locally, I used a MediaElement source, for example:
<MediaElement x:Name="VideoMediaElement" Source="Assets/126.mp4">
...
</MediaElement>
This source works on my development machine and my staging server, but I found that it only works on Google Chrome. After a lot of research and testing, I converted my application to establish the source:
<MediaElement x:Name="VideoMediaElement" Source="http://localhost:40000/ClientBin/Assets/126.mp4">
...
</MediaElement>
Using this type of Uri allows my video to play on my local server in Internet Explorer, as well as in Google Chrome. When I click this on my intermediate server, the path is calculated as:
<MediaElement x:Name="VideoMediaElement" Source="http://myDomain/MyVirtualDir/ClientBin/Assets/126.mp4">
...
</MediaElement>
, .
, , - . Uri, ?
Silverlight 4 MediaElement?