mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2025-01-07 10:07:57 +01:00
Remove beforeRouteLeave in ft-video-player as it is never called (#3213)
This commit is contained in:
parent
290435d545
commit
d6b355082a
@ -20,23 +20,6 @@ import { getPicturesPath, showSaveDialog, showToast } from '../../helpers/utils'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'FtVideoPlayer',
|
||||
beforeRouteLeave: function () {
|
||||
document.removeEventListener('keydown', this.keyboardShortcutHandler)
|
||||
if (this.player !== null) {
|
||||
this.exitFullWindow()
|
||||
}
|
||||
if (this.player !== null && !this.player.isInPictureInPicture()) {
|
||||
this.player.dispose()
|
||||
this.player = null
|
||||
} else if (this.player.isInPictureInPicture()) {
|
||||
this.player.play()
|
||||
}
|
||||
|
||||
if (process.env.IS_ELECTRON && this.powerSaveBlocker !== null) {
|
||||
const { ipcRenderer } = require('electron')
|
||||
ipcRenderer.send(IpcChannels.STOP_POWER_SAVE_BLOCKER, this.powerSaveBlocker)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
format: {
|
||||
type: String,
|
||||
@ -332,6 +315,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
beforeDestroy: function () {
|
||||
document.removeEventListener('keydown', this.keyboardShortcutHandler)
|
||||
if (this.player !== null) {
|
||||
this.exitFullWindow()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user