ce3c4e6f by Jon-Carlos Rivera

Fix fastQualityChange_ to stop calling a function that no longers exists (currentTimeFunc) (#704)

Fix fastQualityChange_ to stop calling a function that no longer exists
1 parent 2700601b
......@@ -350,7 +350,7 @@ export default class MasterPlaylistController extends videojs.EventTarget {
if (media !== this.masterPlaylistLoader_.media()) {
this.masterPlaylistLoader_.media(media);
this.mainSegmentLoader_.sourceUpdater_.remove(this.currentTimeFunc() + 5, Infinity);
this.mainSegmentLoader_.sourceUpdater_.remove(this.tech_.currentTime() + 5, Infinity);
}
}
......
......@@ -43,7 +43,6 @@ QUnit.module('MasterPlaylistController', {
QUnit.test('throws error when given an empty URL', function() {
let options = {
url: 'test',
currentTimeFunc: () => {},
tech: this.player.tech_
};
......@@ -108,7 +107,7 @@ QUnit.test('clears some of the buffer for a fast quality change', function() {
this.masterPlaylistController.selectPlaylist = () => {
return this.masterPlaylistController.master().playlists[0];
};
this.masterPlaylistController.currentTimeFunc = () => 7;
this.masterPlaylistController.tech_.currentTime = () => 7;
this.masterPlaylistController.fastQualityChange_();
......