Skip to content

Commit

Permalink
fix(seek-bar): remove event listener on dispose (#7258)
Browse files Browse the repository at this point in the history
We were accidentally listening to `liveedgechange` when the seek-bar disposed. Instead, we should remove that event handler.
  • Loading branch information
boris-petrov authored Jun 2, 2021
1 parent b3503c9 commit c70c298
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/control-bar/progress-control/seek-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ class SeekBar extends Slider {

this.off(this.player_, ['ended', 'durationchange', 'timeupdate'], this.update);
if (this.player_.liveTracker) {
this.on(this.player_.liveTracker, 'liveedgechange', this.update);
this.off(this.player_.liveTracker, 'liveedgechange', this.update);
}

this.off(this.player_, ['playing'], this.enableIntervalHandler_);
Expand Down

0 comments on commit c70c298

Please sign in to comment.