[vlc-commits] youtube.lua: support embedded iframe URLs
Pierre Ynard
git at videolan.org
Sat Oct 25 03:54:15 CEST 2014
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sat Oct 25 03:51:45 2014 +0200| [77f58c382703f93e899683844d1917cd7cb69d22] | committer: Pierre Ynard
youtube.lua: support embedded iframe URLs
Closes #11878
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=77f58c382703f93e899683844d1917cd7cb69d22
---
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 44b7bac..24c4cf7 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -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
@@ -374,6 +375,9 @@ function parse()
_,_,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 { }
end
More information about the vlc-commits
mailing list