1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-01-18 14:07:26 -05:00
parent 047fd2b438
commit 6f96e87248
22 changed files with 472 additions and 303 deletions

View file

@ -3,23 +3,22 @@
*/
import Event from '../events';
import EventHandler from '../event-handler';
class AbrController {
class AbrController extends EventHandler {
constructor(hls) {
this.hls = hls;
super(hls, Event.FRAG_LOAD_PROGRESS);
this.lastfetchlevel = 0;
this._autoLevelCapping = -1;
this._nextAutoLevel = -1;
this.onflp = this.onFragmentLoadProgress.bind(this);
hls.on(Event.FRAG_LOAD_PROGRESS, this.onflp);
}
destroy() {
this.hls.off(Event.FRAG_LOAD_PROGRESS, this.onflp);
EventHandler.prototype.destroy.call(this);
}
onFragmentLoadProgress(event, data) {
onFragLoadProgress(data) {
var stats = data.stats;
if (stats.aborted === undefined) {
this.lastfetchduration = (performance.now() - stats.trequest) / 1000;