mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-09-11 13:37:10 +03:00
Fix embed with api enabled
Don't off all handlers if the second argument is `undefined`
This commit is contained in:
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
Block a user