Skip to content

Commit

Permalink
remove .ended_ check from test, add comment in fastQualityChange
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-barstow committed Aug 9, 2018
1 parent d5d9750 commit a23cf57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/master-playlist-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,9 @@ export class MasterPlaylistController extends videojs.EventTarget {
// in place to give the browser a kick to remove any cached frames from the
// previous rendition
this.mainSegmentLoader_.resetEverything(() => {
// We avoid the seekTo method here to prevent the buffering of segments from
// the previously enabled rendition before the new playlist has finished loading
// Since this is not a typical seek, we avoid the seekTo method which can cause
// segments from the previously enabled rendition to load before the new playlist
// has finished loading
this.tech_.setCurrentTime(this.tech_.currentTime());
});

Expand Down
2 changes: 0 additions & 2 deletions test/master-playlist-controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,6 @@ QUnit.test('resets everything for a fast quality change', function(assert) {

this.masterPlaylistController.fastQualityChange_();

assert.equal(segmentLoader.ended_, false, 'segment loader ended property is false');

assert.equal(resyncs, 1, 'resynced segment loader if media is changed');

assert.equal(resets, 1, 'reseteverything event triggered if media is changed');
Expand Down

0 comments on commit a23cf57

Please sign in to comment.