I used to listen to Youtube music in VLC media player. I used to:
Open Firefox browser, go to Youtube.com web page. Clicked on music so music was starting to play.
Copy link from browser URL.
Open VLC and from menu selct Media | Open Network Stream
Paste the link and click on Play button.
EXPECTED: music starts playing in VLC media player
PROBLEM: music does not starts playing and no error is returned
I don’t think that playing Youtube is related to connected interfaces. I would suggest you start vlc in the console by running snap run vlc and observe any messages that pop up when you try to play a video on youtube.
This may sound silly, but also make sure that those videos are accessible with a browser.
There’s a lot of problems with Youtube in particular that make this hard to diagnose.
Firstly, the YT website intentionally obfuscuates itself to prevent scraping. It is absolutely expected that YouTube in VLC, and any other apps, e.g, youtubedl, newpipe, invidious, etc. will break seemingly at random and for a period of potentially hours to days and require updates to whatever app is using them.
But beyond this for any given video, a video may be protected by a higher level of obfuscuation depending on the channel, E.G, it is harder to scrape video’s registered by Vevo than say a freely licensed lecture from MIT. You might be able to access the majority of content on the service but find specific videos are just unavailable entirely, and they’ll tend to be ones that enjoy the higher levels of obfuscuation.
Add on other factors, such as age restriction, reigional lockout, and in some scenarios, content that only the YouTube Mobile apps can play, and are not accessible from a desktop browser at all, and it becomes basically impossible to cover every single edge case.
Ultimately, this seems like YouTube just being YouTube, they want you to use their official products, and I’d point the finger at Google breaking things intentionally well before assuming it’s anything wrong with the Snap build of VLC itself (though it could be a problem that needs fixing in VLC in general).
Thanks this helped a lot to debug. In VLC when I pressed the Start button to start playing music the following error appeared in the console:
http stream error: local stream 1 error: Cancellation (0x8)
Then I have searched the web with above error and found the following thread on official VLC forum just few days old with suggestion:
Tools → Preferences → Show settings: All → Input/Codecs → Access modules → HTTPS → uncheck Cookies forwarding
Saved the setting and restarted VLC. This solved my problem. Now I can play music from VLC just fine.