Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
64e30497
Commit
64e30497
authored
Oct 10, 2012
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
youtube.lua: support live streams
This could use a bit more testing than a single video
parent
88671de6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
share/lua/playlist/youtube.lua
share/lua/playlist/youtube.lua
+20
-0
No files found.
share/lua/playlist/youtube.lua
View file @
64e30497
...
...
@@ -158,6 +158,16 @@ function parse()
url_map = string.gsub( url_map, "
\\
u0026
", "
&
" )
path = pick_url( url_map, fmt )
end
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\"
:
\
"(.-)\"" )
if hlsvp then
hlsvp = string.gsub( hlsvp, "
\\
/
", "
/
" )
path = hlsvp
end
end
-- There is also another version of the parameters, encoded
-- differently, as an HTML attribute of an <object> or <embed>
-- tag; but we don't need it now
...
...
@@ -209,6 +219,16 @@ function parse()
path = pick_url( url_map, fmt )
end
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
=
([
^
&
]
*
)
" )
if hlsvp then
hlsvp = vlc.strings.decode_uri( hlsvp )
path = hlsvp
end
end
if not path then
vlc.msg.err( "
Couldn
't extract youtube video URL, please check for updates to this script" )
return { }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment