mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +02:00
youtube.lua: update live stream support to website changes
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
This commit is contained in:
parent
eaac577868
commit
c4bdca7aec
@ -316,7 +316,7 @@ function parse()
|
|||||||
if not path then
|
if not path then
|
||||||
-- If this is a live stream, the URL map will be empty
|
-- If this is a live stream, the URL map will be empty
|
||||||
-- and we get the URL from this field instead
|
-- and we get the URL from this field instead
|
||||||
local hlsvp = string.match( line, "\"hlsvp\": *\"(.-)\"" )
|
local hlsvp = string.match( line, '\\"hlsManifestUrl\\": *\\"(.-)\\"' )
|
||||||
if hlsvp then
|
if hlsvp then
|
||||||
hlsvp = string.gsub( hlsvp, "\\/", "/" )
|
hlsvp = string.gsub( hlsvp, "\\/", "/" )
|
||||||
path = hlsvp
|
path = hlsvp
|
||||||
@ -372,7 +372,7 @@ function parse()
|
|||||||
if not path then
|
if not path then
|
||||||
-- If this is a live stream, the URL map will be empty
|
-- If this is a live stream, the URL map will be empty
|
||||||
-- and we get the URL from this field instead
|
-- 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
|
if hlsvp then
|
||||||
hlsvp = vlc.strings.decode_uri( hlsvp )
|
hlsvp = vlc.strings.decode_uri( hlsvp )
|
||||||
path = hlsvp
|
path = hlsvp
|
||||||
|
Loading…
Reference in New Issue
Block a user