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 { ...@@ -350,7 +350,7 @@ export default class MasterPlaylistController extends videojs.EventTarget {
350 350
351 if (media !== this.masterPlaylistLoader_.media()) { 351 if (media !== this.masterPlaylistLoader_.media()) {
352 this.masterPlaylistLoader_.media(media); 352 this.masterPlaylistLoader_.media(media);
353 this.mainSegmentLoader_.sourceUpdater_.remove(this.currentTimeFunc() + 5, Infinity); 353 this.mainSegmentLoader_.sourceUpdater_.remove(this.tech_.currentTime() + 5, Infinity);
354 } 354 }
355 } 355 }
356 356
......
...@@ -43,7 +43,6 @@ QUnit.module('MasterPlaylistController', { ...@@ -43,7 +43,6 @@ QUnit.module('MasterPlaylistController', {
43 QUnit.test('throws error when given an empty URL', function() { 43 QUnit.test('throws error when given an empty URL', function() {
44 let options = { 44 let options = {
45 url: 'test', 45 url: 'test',
46 currentTimeFunc: () => {},
47 tech: this.player.tech_ 46 tech: this.player.tech_
48 }; 47 };
49 48
...@@ -108,7 +107,7 @@ QUnit.test('clears some of the buffer for a fast quality change', function() { ...@@ -108,7 +107,7 @@ QUnit.test('clears some of the buffer for a fast quality change', function() {
108 this.masterPlaylistController.selectPlaylist = () => { 107 this.masterPlaylistController.selectPlaylist = () => {
109 return this.masterPlaylistController.master().playlists[0]; 108 return this.masterPlaylistController.master().playlists[0];
110 }; 109 };
111 this.masterPlaylistController.currentTimeFunc = () => 7; 110 this.masterPlaylistController.tech_.currentTime = () => 7;
112 111
113 this.masterPlaylistController.fastQualityChange_(); 112 this.masterPlaylistController.fastQualityChange_();
114 113
......