23063508 by jrivera

Fix tests

All seek-to-live type tests require setting readyState now
1 parent d57b213a
......@@ -335,6 +335,8 @@ test('autoplay seeks to the live point after playlist load', function() {
type: 'application/vnd.apple.mpegurl'
});
openMediaSource(player);
player.tech_.readyState = 3;
player.tech_.trigger('play');
standardXHRResponse(requests.shift());
clock.tick(1);
......@@ -355,6 +357,8 @@ test('autoplay seeks to the live point after media source open', function() {
clock.tick(1);
standardXHRResponse(requests.shift());
openMediaSource(player);
player.tech_.readyState = 3;
player.tech_.trigger('play');
clock.tick(1);
notEqual(currentTime, 0, 'seeked on autoplay');
......@@ -406,6 +410,7 @@ test('calls `remove` on sourceBuffer to when loading a live segment', function()
player.tech_.hls.playlists.trigger('loadedmetadata');
player.tech_.trigger('canplay');
player.tech_.paused = function() { return false; };
player.tech_.readyState = 3;
player.tech_.trigger('play');
clock.tick(1);
......@@ -1683,6 +1688,7 @@ test('live playlist starts three target durations before live', function() {
equal(requests.length, 0, 'no outstanding segment request');
player.tech_.paused = function() { return false; };
player.tech_.readyState = 3;
player.tech_.trigger('play');
clock.tick(1);
mediaPlaylist = player.tech_.hls.playlists.media();
......@@ -1703,6 +1709,7 @@ test('live playlist starts with correct currentTime value', function() {
player.tech_.hls.playlists.trigger('loadedmetadata');
player.tech_.paused = function() { return false; };
player.tech_.readyState = 3;
player.tech_.trigger('play');
clock.tick(1);
......