Browse Source

Handle player being removed

pull/2032/head
Gabe Kangas 3 years ago
parent
commit
6ee2866260
No known key found for this signature in database
GPG Key ID: 9A56337728BC81EA
  1. 3
      web/components/video/metrics/playback.js

3
web/components/video/metrics/playback.js

@ -46,6 +46,7 @@ class PlaybackMetrics { @@ -46,6 +46,7 @@ class PlaybackMetrics {
this.handleBuffering = this.handleBuffering.bind(this);
this.handleEnded = this.handleEnded.bind(this);
this.handleError = this.handleError.bind(this);
this.send = this.send.bind(this);
this.collectPlaybackMetrics = this.collectPlaybackMetrics.bind(this);
this.handleNoLongerBuffering = this.handleNoLongerBuffering.bind(this);
@ -225,7 +226,7 @@ class PlaybackMetrics { @@ -225,7 +226,7 @@ class PlaybackMetrics {
}
// If we're paused then do nothing.
if (this.player.paused()) {
if (!this.player || this.player.paused()) {
return;
}

Loading…
Cancel
Save