mirror of https://github.com/Chocobozzz/PeerTube
Fix embed with api enabled
Don't off all handlers if the second argument is `undefined`pull/6548/head
parent
121a617bec
commit
103505421f
|
@ -166,9 +166,9 @@ export class PeerTubeEmbedApi {
|
||||||
private disposeStateTracking () {
|
private disposeStateTracking () {
|
||||||
if (!this.player) return
|
if (!this.player) return
|
||||||
|
|
||||||
this.player.off('play', this.videoElPlayListener)
|
if (this.videoElPlayListener) this.player.off('play', this.videoElPlayListener)
|
||||||
this.player.off('pause', this.videoElPauseListener)
|
if (this.videoElPauseListener) this.player.off('pause', this.videoElPauseListener)
|
||||||
this.player.off('ended', this.videoElEndedListener)
|
if (this.videoElEndedListener) this.player.off('ended', this.videoElEndedListener)
|
||||||
|
|
||||||
clearInterval(this.videoElInterval)
|
clearInterval(this.videoElInterval)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue