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
6b8e12ec
authored
2014-10-27 19:01:43 -0400
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
set high bandwidth so we don't switch
1 parent
32a44186
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
test/videojs-hls_test.js
test/videojs-hls_test.js
View file @
6b8e12e
...
...
@@ -376,7 +376,9 @@ test('downloads a second media playlist before playback', function() {
openMediaSource
(
player
);
standardXHRResponse
(
requests
[
0
]);
player
.
hls
.
bandwidth
=
0
;
requests
[
1
].
requestTime
=
(
new
Date
())
-
100
;
standardXHRResponse
(
requests
[
1
]);
standardXHRResponse
(
requests
[
2
]);
standardXHRResponse
(
requests
[
3
]);
...
...
@@ -445,6 +447,8 @@ test('selects a playlist after segment downloads', function() {
openMediaSource
(
player
);
standardXHRResponse
(
requests
[
0
]);
player
.
hls
.
bandwidth
=
3000000
;
standardXHRResponse
(
requests
[
1
]);
standardXHRResponse
(
requests
[
2
]);
...
...
@@ -471,6 +475,8 @@ test('moves to the next segment if there is a network error', function() {
openMediaSource
(
player
);
standardXHRResponse
(
requests
[
0
]);
player
.
hls
.
bandwidth
=
3000000
;
standardXHRResponse
(
requests
[
1
]);
mediaIndex
=
player
.
hls
.
mediaIndex
;
...
...
@@ -524,6 +530,8 @@ test('downloads additional playlists if required', function() {
openMediaSource
(
player
);
standardXHRResponse
(
requests
[
0
]);
player
.
hls
.
bandwidth
=
3000000
;
standardXHRResponse
(
requests
[
1
]);
// before an m3u8 is downloaded, no segments are available
player
.
hls
.
selectPlaylist
=
function
()
{
...
...
@@ -1199,6 +1207,8 @@ test('resets the switching algorithm if a request times out', function() {
});
openMediaSource
(
player
);
standardXHRResponse
(
requests
.
shift
());
// master
player
.
hls
.
bandwidth
=
3000000
;
standardXHRResponse
(
requests
.
shift
());
// media.m3u8
// simulate a segment timeout
requests
[
0
].
timedout
=
true
;
...
...
Please
register
or
sign in
to post a comment