Search code examples
c#vlcflv

VLC Videoplayer in C# Windows Form doesn't play .flv web file


I'm using a xml file which put out a link to a .flv file.

Now I want to play this file in a VLC Videoplayerscreen in my C# Windows form. When I place the link direct in the VLC player's MRL, it works fine and plays the file. When I place the string with the .flv link in the code inside the MRL, it doesn't play.

What I have:

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   { 

        }

Solution

  • Now I add the video link to a playlist and start playing the playlist. It works!

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