Skip to content

Commit

Permalink
youtube.lua: update live stream support to website changes
Browse files Browse the repository at this point in the history
Instead of the previous "hlsvp" parameter, the URL can now be found in a
deeper "hlsManifestUrl" parameter.

Thanks to forum thread for analysis!

Fixes #21738
  • Loading branch information
linkfanel committed Jan 19, 2019
1 parent eaac577 commit c4bdca7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions share/lua/playlist/youtube.lua
Expand Up @@ -316,7 +316,7 @@ function parse()
if not path then
-- If this is a live stream, the URL map will be empty
-- and we get the URL from this field instead
local hlsvp = string.match( line, "\"hlsvp\": *\"(.-)\"" )
local hlsvp = string.match( line, '\\"hlsManifestUrl\\": *\\"(.-)\\"' )
if hlsvp then
hlsvp = string.gsub( hlsvp, "\\/", "/" )
path = hlsvp
Expand Down Expand Up @@ -372,7 +372,7 @@ function parse()
if not path then
-- If this is a live stream, the URL map will be empty
-- and we get the URL from this field instead
local hlsvp = string.match( line, "&hlsvp=([^&]*)" )
local hlsvp = string.match( line, "%%22hlsManifestUrl%%22%%3A%%22(.-)%%22" )
if hlsvp then
hlsvp = vlc.strings.decode_uri( hlsvp )
path = hlsvp
Expand Down

0 comments on commit c4bdca7

Please sign in to comment.