[vlc-commits] youtube.lua: support gaming.youtube.com
Ludovic Fauvet
git at videolan.org
Fri Feb 2 15:29:08 CET 2018
vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Fri Feb 2 15:22:24 2018 +0100| [b9bb5396c84f81f8c5b46dbc03a92cebe8d9d60d] | committer: Ludovic Fauvet
youtube.lua: support gaming.youtube.com
The page content of gaming.y.o is different, yet the main website plays
video from gaming.y.o the same way, therefore a simple redirect do the
trick.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9bb5396c84f81f8c5b46dbc03a92cebe8d9d60d
---
share/lua/playlist/youtube.lua | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index fc9a68c483..a7eeeb375d 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -227,8 +227,10 @@ end
-- Probe function.
function probe()
return ( ( vlc.access == "http" or vlc.access == "https" )
- and string.match( vlc.path, "^www%.youtube%.com/" )
and (
+ string.match( vlc.path, "^www%.youtube%.com/" )
+ or string.match( vlc.path, "^gaming%.youtube%.com/" )
+ ) and (
string.match( vlc.path, "/watch%?" ) -- the html page
or string.match( vlc.path, "/live$" ) -- user live stream html page
or string.match( vlc.path, "/live%?" ) -- user live stream html page
@@ -240,6 +242,10 @@ end
-- Parse function.
function parse()
+ if string.match( vlc.path, "^gaming%.youtube%.com/" ) then
+ url = string.gsub( vlc.path, "^gaming%.youtube%.com", "www.youtube.com" )
+ return { { path = vlc.access.."://"..url } }
+ end
if string.match( vlc.path, "/watch%?" )
or string.match( vlc.path, "/live$" )
or string.match( vlc.path, "/live%?" )
More information about the vlc-commits
mailing list