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
a45f4685
authored
2013-12-11 19:45:25 -0500
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Handle optional extinf desc properly
1 parent
c815165f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
src/m3u8/m3u8.pegjs
src/m3u8/m3u8.pegjs
View file @
a45f468
...
...
@@ -40,7 +40,7 @@ m3uTag
= tag:"#EXTM3U" { return {openTag: true}; }
extinfTag
= tag:'#EXTINF' ":" duration:number "," optional:extinfOptionalParts
?
_ file:mediaFile {
= tag:'#EXTINF' ":" duration:number "," optional:extinfOptionalParts _ file:mediaFile {
var fileObj = {};
fileObj[tag + line] = {
byteRange: optional.byteRange,
...
...
@@ -52,7 +52,7 @@ extinfTag
}
byteRangeTag
= tag:"EXT-X-BYTERANGE" ":" length:int ("@" offset:int)? { return {length: length, offset: offset}; }
= tag:"
#
EXT-X-BYTERANGE" ":" length:int ("@" offset:int)? { return {length: length, offset: offset}; }
targetDurationTag
= tag:"#EXT-X-TARGETDURATION" ":" seconds:int { return {targetDuration: seconds}; }
...
...
@@ -112,8 +112,8 @@ versionTag
/***** Helpers *****/
extinfOptionalParts
=
_? byteRange:byteRangeTag? { return {title: '', byteRange: byteRange};
}
/ _
? title:nonbreakingText? _? byteRange:byteRangeTag? { return {title: title, byteRange: byteRange}
}
=
nonbreakingWhitespace title:text _ byteRange:byteRangeTag? { return {title: title, byteRange: byteRange}
}
/ _
byteRange:byteRangeTag? { return {title: '', byteRange: byteRange};
}
mediaFile
= & tag
...
...
@@ -268,9 +268,6 @@ quotedChar
= [^\r\n"]
/ char:char
nonbreakingText
= text:quotedChar+ { return text.join(''); }
text "text"
= text:char+ { return text.join(''); }
...
...
@@ -282,3 +279,6 @@ _ "whitespace"
whitespace
= [ \t\n\r]
nonbreakingWhitespace
= [ \t]*
...
...
Please
register
or
sign in
to post a comment