mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2026-09-03 20:53:09 -05:00
Fix crash when destroying player
This commit is contained in:
@@ -90,8 +90,10 @@ export class EndCard extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dispose () {
|
dispose () {
|
||||||
if (this.onEndedHandler) this.player().off([ 'auto-stopped', 'ended' ], this.onEndedHandler)
|
if (this.player()) {
|
||||||
if (this.onPlayingHandler) this.player().off('playing', this.onPlayingHandler)
|
if (this.onEndedHandler) this.player().off([ 'auto-stopped', 'ended' ], this.onEndedHandler)
|
||||||
|
if (this.onPlayingHandler) this.player().off('playing', this.onPlayingHandler)
|
||||||
|
}
|
||||||
|
|
||||||
if (this.timeout) clearTimeout(this.timeout)
|
if (this.timeout) clearTimeout(this.timeout)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user