C#Windows窗体中的VLC Videoplayer无法播放.flv网络文件

时间:2015-04-22 10:20:15

标签: c# vlc flv

我正在使用一个xml文件,该文件提供了一个指向.flv文件的链接。

现在我想在我的C#Windows窗体中的VLC Videoplayerscreen中播放此文件。 当我将链接直接放在VLC播放器的MRL中时,它可以正常工作并播放该文件。 当我将带有.flv链接的字符串放在MRL内的代码中时,它不会播放。

我有什么:

try
        {
            // XML works fine and flv link is placed inside nuvid
            XmlNodeList nuvid = xmlDoc.GetElementsByTagName("location");
            vlcvid.MRL = nuvid[1].InnerText;// placing the link inside the MRL
            vlcvid.AutoPlay = true; // Try to play
            MessageBox.Show(vlcvid.MRL);// the link is placed succesfull inside the MRL

        }

catch   { 

        }

1 个答案:

答案 0 :(得分:1)

现在我将视频链接添加到播放列表并开始播放播放列表。它有效!

vlcvid.playlist.add(vlcvid.MRL);
vlcvid.playlist.next();