]> git.sesse.net Git - vlc/commitdiff
youtube.lua: support embedded iframe URLs
authorPierre Ynard <linkfanel@yahoo.fr>
Sat, 25 Oct 2014 01:51:45 +0000 (03:51 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Sat, 25 Oct 2014 01:51:45 +0000 (03:51 +0200)
Closes #11878

share/lua/playlist/youtube.lua

index 44b7bac94140a8757668fae56d57ead2b6d00d03..24c4cf7759396ca13ba0aef829ce9961756ff8e3 100644 (file)
@@ -215,6 +215,7 @@ function probe()
     return (  string.match( vlc.path, "/watch%?" ) -- the 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
             or string.match( vlc.path, "/player2.swf" ) ) -- another player url
 end
 
@@ -373,6 +374,9 @@ function parse()
         if not video_id then
             _,_,video_id = string.find( vlc.path, "/v/([^?]*)" )
         end
+        if not video_id then
+            video_id = string.match( vlc.path, "/embed/([^?]*)" )
+        end
         if not video_id then
             vlc.msg.err( "Couldn't extract youtube video URL" )
             return { }