Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
67bdb0e1
authored
2013-12-11 19:20:42 -0500
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
handle optional extinf title properly
1 parent
e53563ee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
src/m3u8/m3u8.pegjs
src/m3u8/m3u8.pegjs
View file @
67bdb0e
...
...
@@ -40,11 +40,11 @@ m3uTag
= tag:"#EXTM3U" { return {openTag: true}; }
extinfTag
= tag:'#EXTINF' ":" duration:number ","
_ title:text? _ byteRange:byteRangeTag
? _ file:mediaFile {
= tag:'#EXTINF' ":" duration:number ","
optional:extinfOptionalParts
? _ file:mediaFile {
var fileObj = {};
fileObj[tag + line] = {
byteRange: byteRange,
title: title,
byteRange:
optional.
byteRange,
title:
optional.
title,
duration: duration,
file: file
};
...
...
@@ -111,6 +111,10 @@ versionTag
/***** Helpers *****/
extinfOptionalParts
= _? byteRange:byteRangeTag? { return {title: '', byteRange: byteRange}; }
/ _? title:nonbreakingText? _? byteRange:byteRangeTag? { return {title: title, byteRange: byteRange} }
mediaFile
= & tag
/ ! tag file:[ -~]+ { return file.join(''); }
...
...
@@ -264,6 +268,9 @@ quotedChar
= [^\r\n"]
/ char:char
nonbreakingText
= text:quotedChar+ { return text.join(''); }
text "text"
= text:char+ { return text.join(''); }
...
...
Please
register
or
sign in
to post a comment