Commit 77f58c38 authored by Pierre Ynard's avatar Pierre Ynard

youtube.lua: support embedded iframe URLs

Closes #11878
parent 1ab2a942
......@@ -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 { }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment