[vlc-commits] youtube.lua: user live stream URL support

Pierre Ynard git at videolan.org
Tue Feb 9 19:53:32 CET 2016


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Tue Feb  9 19:48:17 2016 +0100| [b31a171b70386edbb86198294e8ed6f0806a4c8a] | committer: Pierre Ynard

youtube.lua: user live stream URL support

This URL format is handed out by youtube when a user uploads and
publishes a live stream through their account. This is just an alternate
URL format over the classic HTML page for a video. We already have live
stream support for these when applicable.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b31a171b70386edbb86198294e8ed6f0806a4c8a
---

 share/lua/playlist/youtube.lua |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 6743f79..9d87b8b 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -234,6 +234,8 @@ function probe()
         end
     end
     return (  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
             or string.match( vlc.path, "/get_video_info%?" ) -- info API
             or string.match( vlc.path, "/v/" ) -- video in swf player
             or string.match( vlc.path, "/embed/" ) -- embedded player iframe
@@ -243,6 +245,8 @@ end
 -- Parse function.
 function parse()
     if string.match( vlc.path, "/watch%?" )
+        or string.match( vlc.path, "/live$" )
+        or string.match( vlc.path, "/live%?" )
     then -- This is the HTML page's URL
         -- fmt is the format of the video
         -- (cf. http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs)



More information about the vlc-commits mailing list