}
showSupportModal () {
+ this.pausePlayer()
+
this.videoSupportModal.show()
}
showShareModal () {
+ this.pausePlayer()
+
this.videoShareModal.show(this.currentTime)
}
}
}
+ onModalOpened () {
+ this.pausePlayer()
+ }
+
onVideoRemoved () {
this.redirectService.redirectToHomepage()
}
this.zone.runOutsideAngular(async () => {
this.player = await PeertubePlayerManager.initialize(mode, options, player => this.player = player)
+ this.player.focus()
this.player.on('customError', ({ err }: { err: any }) => this.handleError(err))
]
if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys)
}
+
+ private pausePlayer () {
+ if (!this.player) return
+
+ this.player.pause()
+ }
}