mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-08-17 09:20:26 +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 () {
|
||||
if (!this.player) return
|
||||
|
||||
this.player.off('play', this.videoElPlayListener)
|
||||
this.player.off('pause', this.videoElPauseListener)
|
||||
this.player.off('ended', this.videoElEndedListener)
|
||||
if (this.videoElPlayListener) this.player.off('play', this.videoElPlayListener)
|
||||
if (this.videoElPauseListener) this.player.off('pause', this.videoElPauseListener)
|
||||
if (this.videoElEndedListener) this.player.off('ended', this.videoElEndedListener)
|
||||
|
||||
clearInterval(this.videoElInterval)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user