ActivityPub-federated video streaming platform using P2P directly in your web browser
More player guards
Chocobozzza5d26fd54256
diff --git a/client/src/standalone/player/src/shared/bezels/pause-bezel.ts b/client/src/standalone/player/src/shared/bezels/pause-bezel.tsindex d63c8b7812..4f57bfa796 100644--- a/client/src/standalone/player/src/shared/bezels/pause-bezel.ts+++ b/client/src/standalone/player/src/shared/bezels/pause-bezel.ts@@ -87,9 +87,11 @@ export class PauseBezel extends Component {}dispose () {- if (this.playerPauseHandler) this.player().off('pause', this.playerPauseHandler)- if (this.playerPlayHandler) this.player().off('play', this.playerPlayHandler)- if (this.videoChangeHandler) this.player().off('video-change', this.videoChangeHandler)+ if (this.player()) {+ if (this.playerPauseHandler) this.player().off('pause', this.playerPauseHandler)+ if (this.playerPlayHandler) this.player().off('play', this.playerPlayHandler)+ if (this.videoChangeHandler) this.player().off('video-change', this.videoChangeHandler)+ }super.dispose()}diff --git a/client/src/standalone/player/src/shared/playlist/playlist-menu.ts b/client/src/standalone/player/src/shared/playlist/playlist-menu.tsindex f759611c74..8c8f45d6ac 100644--- a/client/src/standalone/player/src/shared/playlist/playlist-menu.ts+++ b/client/src/standalone/player/src/shared/playlist/playlist-menu.ts@@ -60,8 +60,10 @@ class PlaylistMenu extends Component {this.el().removeEventListener('mouseenter', this.onMouseEnter)this.el().removeEventListener('mouseleave', this.onMouseLeave)- this.player().off('userinactive', this.userInactiveHandler)- this.player().off('click', this.onPlayerCick)+ if (this.player()) {+ this.player().off('userinactive', this.userInactiveHandler)+ this.player().off('click', this.onPlayerCick)+ }for (const item of this.menuItems) {item.dispose()