我正在尝试在我的 Windows Phone 应用程序中播放一个小视频文件。很基本
void StartMediaPlayer()
{
MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher();
mediaPlayerLauncher.Media = new Uri("/Assets/video/video1.wmv", UriKind.Relative);
mediaPlayerLauncher.Location = MediaLocationType.Install;
mediaPlayerLauncher.Controls = MediaPlaybackControls.All;
mediaPlayerLauncher.Orientation = MediaPlayerOrientation.Landscape;
mediaPlayerLauncher.Show();
}
我在图像点击事件中称其为 void,这就是发生的事情
调试器显示错误在这里:mediaPlayerLauncher.Show();