How to play Youtube videos in AxVLCPlugin21 ? RRS feed

  • Question

  • At very first i tried to add a file to AxVLCPlugin21 like:

    AxVLCPlugin21 .playlist.Add("D:\Example.mp4");

    It Didn't worked.

    I found that we have to use it like:

    AxVLCPlugin21 .playlist.Add("file:///D:\Example.mp4");

    It worked fine with local file. I tried lots of ways to play "Youtube" video but failed.  Is there any way to play "Youtube" video with AxVLCPlugin21 or anything i can replace "file:///" with and play "Youtube" video?

    Thursday, January 2, 2020 11:28 AM

All replies

  • A consideration

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    profile for Karen Payne on Stack Exchange

    Thursday, January 2, 2020 5:36 PM
  • Hi Aditya, 

    Thank you for posting here.

    Check the following reference about playing Youtube videos in AxVLCPlugin21

    How to play youtube videos through vlc plugin?

    Beisdes, in order to play Youtube videos, you can use WebBrowser control.

    You need to create a form and put a WebBrowser control on it.

    Note: you should make sure the video is allowed to be played as embedded, and use the embed url.

    Here’s the code you can refer to.

        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Dim embed = "<html><head>" & "<meta http-equiv=""X-UA-Compatible"" content=""IE=Edge""/>" & "</head><body>" & "<iframe width=""300"" src=""{0}""" & "frameborder = ""0"" allow = ""autoplay; encrypted-media"" allowfullscreen></iframe>" & "</body></html>"
            Dim url = ""
            Me.WebBrowser1.DocumentText = String.Format(embed, url)
        End Sub

    Result of my test:

    Hope them can help you.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Friday, January 3, 2020 5:58 AM