0

我已经指定了视频文件的路径,如下所示:

VideoPath = string.Format("/Content/Videos/{0}", VideoFileName)

但是当我尝试在 MediaPlayerLauncher 中调用它时,我得到 FileNotFoundException

  MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher();
  mediaPlayerLauncher.Media = new Uri(VideoPath , UriKind.Relative);
  mediaPlayerLauncher.Controls = MediaPlaybackControls.All;

有什么解决办法吗?
谢谢!

4

1 回答 1

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);
于 2013-06-26T19:37:41.160 回答