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
f3e5d4af
authored
2014-04-24 11:40:27 -0400
by
Lee Whitaker
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add test for stripping carriage returns.
1 parent
afb634ee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
test/m3u8_test.js
test/m3u8_test.js
View file @
f3e5d4a
...
...
@@ -206,6 +206,23 @@
manifest
.
substring
(
manifest
.
indexOf
(
','
)
+
1
,
manifest
.
length
-
1
),
'the title is parsed'
);
});
test
(
'parses #EXTINF tags with carriage returns'
,
function
()
{
var
manifest
=
'#EXTINF:13,Does anyone really use the title attribute?\r\n'
,
element
;
parseStream
.
on
(
'data'
,
function
(
elem
)
{
element
=
elem
;
});
lineStream
.
push
(
manifest
);
ok
(
element
,
'an event was triggered'
);
strictEqual
(
element
.
type
,
'tag'
,
'the line type is tag'
);
strictEqual
(
element
.
tagType
,
'inf'
,
'the tag type is inf'
);
strictEqual
(
element
.
duration
,
13
,
'the duration is parsed'
);
strictEqual
(
element
.
title
,
manifest
.
substring
(
manifest
.
indexOf
(
','
)
+
1
,
manifest
.
length
-
2
),
'the title is parsed'
);
});
// #EXT-X-TARGETDURATION
test
(
'parses minimal #EXT-X-TARGETDURATION tags'
,
function
()
{
...
...
Please
register
or
sign in
to post a comment