Skip to content

Commit

Permalink
remove seek test for quality changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed Jul 10, 2024
1 parent f27df34 commit d0c4ee4
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions test/playlist-controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,55 +777,6 @@ QUnit.test('loadVttJs should be passed to the vttSegmentLoader and rejected on v
});
});

QUnit.test('seeks in place for fast quality switch on non-IE/Edge browsers', function(assert) {
let seeks = 0;

this.playlistController.mediaSource.trigger('sourceopen');
// main
this.standardXHRResponse(this.requests.shift());
// media
this.standardXHRResponse(this.requests.shift());

const segmentLoader = this.playlistController.mainSegmentLoader_;

return requestAndAppendSegment({
request: this.requests.shift(),
segmentLoader,
clock: this.clock
}).then(() => {
// media is changed
this.playlistController.selectPlaylist = () => {
const playlists = this.playlistController.main().playlists;
const currentPlaylist = this.playlistController.media();

return playlists.find((playlist) => playlist !== currentPlaylist);
};

this.player.tech_.on('seeking', function() {
seeks++;
});

const timeBeforeSwitch = this.player.currentTime();

// mock buffered values so removes are processed
segmentLoader.sourceUpdater_.audioBuffer.buffered = createTimeRanges([[0, 10]]);
segmentLoader.sourceUpdater_.videoBuffer.buffered = createTimeRanges([[0, 10]]);

this.playlistController.runFastQualitySwitch_();
// trigger updateend to indicate the end of the remove operation
segmentLoader.sourceUpdater_.audioBuffer.trigger('updateend');
segmentLoader.sourceUpdater_.videoBuffer.trigger('updateend');
this.clock.tick(1);

assert.equal(
this.player.currentTime(),
timeBeforeSwitch,
'current time remains the same on fast quality switch'
);
assert.equal(seeks, 1, 'seek event occurs on fast quality switch');
});
});

QUnit.test('basic timeToLoadedData, mediaAppends, appendsToLoadedData stats', function(assert) {
this.player.tech_.trigger('loadstart');
this.playlistController.mediaSource.trigger('sourceopen');
Expand Down

0 comments on commit d0c4ee4

Please sign in to comment.