Reputation: 294
I've specified the path to video file like this:
VideoPath = string.Format("/Content/Videos/{0}", VideoFileName)
But when I try to invoke it in MediaPlayerLauncher I get FileNotFoundException
MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher();
mediaPlayerLauncher.Media = new Uri(VideoPath , UriKind.Relative);
mediaPlayerLauncher.Controls = MediaPlaybackControls.All;
Any solution?
Thanks!
Upvotes: 0
Views: 144
Reputation: 5895
According msdn try that:
mediaPlayerLauncher.Location = MediaLocationType.Data; // If you open media from isolated storage
// or
mediaPlayerLauncher.Location = MediaLocationType.Install; // If you open media from application project
mediaPlayerLauncher.Media = new Uri(videoPath , UriKind.Relative);
Upvotes: 2