Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Commit

Permalink
use bind
Browse files Browse the repository at this point in the history
  • Loading branch information
squarebracket committed Aug 18, 2017
1 parent a324adb commit ffcde7c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/flash-source-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,13 @@ export default class FlashSourceBuffer extends videojs.EventTarget {
removeCuesFromTrack(0, Infinity, this.inbandTextTrack_);
});

this.mediaSource_.player_.tech_.on('hls-reset', this.resetHls);
let onHlsReset = this.resetHls.bind(this);

this.mediaSource_.player_.tech_.on('hls-reset', onHlsReset);

this.mediaSource_.player_.tech_.hls.on('dispose', () => {
this.transmuxer_.terminate();
this.mediaSource_.player_.tech_.off('hls-reset', this.resetHls);
this.mediaSource_.player_.tech_.off('hls-reset', onHlsReset);
});
}

Expand Down

0 comments on commit ffcde7c

Please sign in to comment.