From 6b8e12ec7cbd99755d3af162dab28966fdcd258d Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Mon, 27 Oct 2014 19:01:43 -0400 Subject: [PATCH] set high bandwidth so we don't switch --- test/videojs-hls_test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/videojs-hls_test.js b/test/videojs-hls_test.js index e5adb064..e1d24fe4 100644 --- a/test/videojs-hls_test.js +++ b/test/videojs-hls_test.js @@ -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;