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

Dec 31, 2011 at 6:36 PM


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

      <Media:PlaylistItem MediaSource=""/>

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 9: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).