我想为rtsp创建一个wpf应用程序。我已经尝试了vlclib并按照所有说明进行操作,所以没有出现任何问题,但是无法播放视频。以下是播放youtube视频的代码
VlcContext.LibVlcDllsPath =“ C:\ Program Files(x86)\ VideoLAN \ VLC \”;
VlcContext.LibVlcPluginsPath = "C:\\Program Files (x86)\\VideoLAN\\VLC\\plugins\\";
private void buttonRtsp_Click(对象发送者,RoutedEventArgs e) { myVlcControl.Stop();
if (myVlcControl.Media != null)
{
myVlcControl.Media.ParsedChanged -= MediaOnParsedChanged;
}
textBlockOpen.Visibility = Visibility.Collapsed;
myVlcControl.Media = new LocationMedia("https://www.youtube.com/watch?v=PxrnoGyBw4E");
myVlcControl.Media.ParsedChanged += MediaOnParsedChanged;
myVlcControl.Play();
}