Player stops working after I change media source from online to local

Dec 31, 2011 at 5:36 PM

Hello,

I'm trying to follow this tutorial and, so far, things are going well. Here's on of the code:

<Core:SMFPlayer>
   <Core:SMFPlayer.Playlist>
      <Media:PlaylistItem MediaSource="http://smf.vertigo.com/videos/wildlife.wmv"/>
   </Core:SMFPlayer.Playlist>
</Core:SMFPlayer>

But, when I try to replace the MediaSource's value by that of a file on my hard drive, nothing happen.


<Media:PlaylistItem MediaSource="c:\videos\myvideo.wmv"/>

Is there any reason for that ???

Thanks for helping.

Jan 2, 2012 at 8:33 AM

A simple reason: Silverlight is sandboxed, which means you're not allowed access to the filesystem by default. You have to either host the file on a webserver or make the user select the video on the disk (which is more complicated than it seems, may require elevated priviledges and/or OOB).