我已经指定了视频文件的路径:
VideoPath = string.Format("/Content/Videos/{0}", VideoFileName)
但是当我尝试在MediaPlayerLauncher中调用它时,我得到了FileNotFoundException
MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher();
mediaPlayerLauncher.Media = new Uri(VideoPath , UriKind.Relative);
mediaPlayerLauncher.Controls = MediaPlaybackControls.All;
任何解决方案?
谢谢!
答案 0 :(得分:2)
根据msdn尝试:
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);