Commit 9c5430dc authored by Pierre Ynard's avatar Pierre Ynard

vimeo.lua: update to website changes

parent 9f4a3ba2
......@@ -37,10 +37,18 @@ function parse()
while true do
local line = vlc.readline()
if not line then break end
path = string.match( line, "data%-config%-url=\"(.-)\"" )
if path then
path = vlc.strings.resolve_xml_special_chars( path )
return { { path = path } }
-- Get the appropriate ubiquitous meta tag. It appears twice:
-- <meta property="og:video:url" content="https://player.vimeo.com/video/123456789?autoplay=1">
-- <meta property="og:video:url" content="https://vimeo.com/moogaloop.swf?clip_id=123456789&amp;autoplay=1">
local meta = string.match( line, "(<meta[^>]- property=\"og:video:url\"[^>]->)" )
if meta then
local path = string.match( meta, " content=\"(.-)\"" )
-- Exclude moogaloop flash URL
if path and string.match( path, "player%.vimeo%.com" ) then
path = vlc.strings.resolve_xml_special_chars( path )
return { { path = path } }
end
end
end
......
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