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
6e7f77c8
authored
2014-04-14 12:38:11 -0400
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixup test
1 parent
f09be04b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
test/videojs-hls_test.js
test/videojs-hls_test.js
View file @
6e7f77c
...
...
@@ -1172,22 +1172,20 @@ test('if withCredentials option is used, withCredentials is set on the XHR objec
});
test
(
'does not break if the playlist has no segments'
,
function
()
{
window
.
XMLHttpRequest
=
function
()
{
this
.
open
=
function
()
{};
this
.
send
=
function
()
{
this
.
readyState
=
4
;
this
.
status
=
200
;
this
.
responseText
=
'#EXTM3U\n'
+
var
customResponse
=
function
(
request
)
{
request
.
response
=
new
Uint8Array
([
1
]).
buffer
;
request
.
respond
(
200
,
{
'Content-Type'
:
'application/vnd.apple.mpegurl'
},
'#EXTM3U\n'
+
'#EXT-X-PLAYLIST-TYPE:VOD\n'
+
'#EXT-X-TARGETDURATION:10\n'
;
this
.
onreadystatechange
();
};
'#EXT-X-TARGETDURATION:10\n'
);
};
player
.
hls
(
'manifest/master.m3u8'
);
try
{
videojs
.
mediaSources
[
player
.
currentSrc
()].
trigger
({
type
:
'sourceopen'
});
customResponse
(
requests
[
0
]);
}
catch
(
e
)
{
ok
(
false
,
'an error was thrown'
);
throw
e
;
...
...
Please
register
or
sign in
to post a comment