6b8e12ec by Gary Katsevman

set high bandwidth so we don't switch

1 parent 32a44186
...@@ -376,7 +376,9 @@ test('downloads a second media playlist before playback', function() { ...@@ -376,7 +376,9 @@ test('downloads a second media playlist before playback', function() {
376 openMediaSource(player); 376 openMediaSource(player);
377 377
378 standardXHRResponse(requests[0]); 378 standardXHRResponse(requests[0]);
379
379 player.hls.bandwidth = 0; 380 player.hls.bandwidth = 0;
381 requests[1].requestTime = (new Date()) - 100;
380 standardXHRResponse(requests[1]); 382 standardXHRResponse(requests[1]);
381 standardXHRResponse(requests[2]); 383 standardXHRResponse(requests[2]);
382 standardXHRResponse(requests[3]); 384 standardXHRResponse(requests[3]);
...@@ -445,6 +447,8 @@ test('selects a playlist after segment downloads', function() { ...@@ -445,6 +447,8 @@ test('selects a playlist after segment downloads', function() {
445 openMediaSource(player); 447 openMediaSource(player);
446 448
447 standardXHRResponse(requests[0]); 449 standardXHRResponse(requests[0]);
450
451 player.hls.bandwidth = 3000000;
448 standardXHRResponse(requests[1]); 452 standardXHRResponse(requests[1]);
449 standardXHRResponse(requests[2]); 453 standardXHRResponse(requests[2]);
450 454
...@@ -471,6 +475,8 @@ test('moves to the next segment if there is a network error', function() { ...@@ -471,6 +475,8 @@ test('moves to the next segment if there is a network error', function() {
471 openMediaSource(player); 475 openMediaSource(player);
472 476
473 standardXHRResponse(requests[0]); 477 standardXHRResponse(requests[0]);
478
479 player.hls.bandwidth = 3000000;
474 standardXHRResponse(requests[1]); 480 standardXHRResponse(requests[1]);
475 481
476 mediaIndex = player.hls.mediaIndex; 482 mediaIndex = player.hls.mediaIndex;
...@@ -524,6 +530,8 @@ test('downloads additional playlists if required', function() { ...@@ -524,6 +530,8 @@ test('downloads additional playlists if required', function() {
524 openMediaSource(player); 530 openMediaSource(player);
525 531
526 standardXHRResponse(requests[0]); 532 standardXHRResponse(requests[0]);
533
534 player.hls.bandwidth = 3000000;
527 standardXHRResponse(requests[1]); 535 standardXHRResponse(requests[1]);
528 // before an m3u8 is downloaded, no segments are available 536 // before an m3u8 is downloaded, no segments are available
529 player.hls.selectPlaylist = function() { 537 player.hls.selectPlaylist = function() {
...@@ -1199,6 +1207,8 @@ test('resets the switching algorithm if a request times out', function() { ...@@ -1199,6 +1207,8 @@ test('resets the switching algorithm if a request times out', function() {
1199 }); 1207 });
1200 openMediaSource(player); 1208 openMediaSource(player);
1201 standardXHRResponse(requests.shift()); // master 1209 standardXHRResponse(requests.shift()); // master
1210
1211 player.hls.bandwidth = 3000000;
1202 standardXHRResponse(requests.shift()); // media.m3u8 1212 standardXHRResponse(requests.shift()); // media.m3u8
1203 // simulate a segment timeout 1213 // simulate a segment timeout
1204 requests[0].timedout = true; 1214 requests[0].timedout = true;
......