Stop power save blocker on route leave

This commit is contained in:
Preston 2021-01-13 15:56:25 -05:00
parent 0295354ffd
commit 5663d56b12
1 changed files with 10 additions and 0 deletions

View File

@ -28,6 +28,11 @@ export default Vue.extend({
} else if (this.player.isInPictureInPicture()) {
this.player.play()
}
if (this.usingElectron && this.powerSaveBlocker !== null) {
const { powerSaveBlocker } = require('electron')
powerSaveBlocker.stop(this.powerSaveBlocker)
}
},
props: {
format: {
@ -172,6 +177,11 @@ export default Vue.extend({
clearTimeout(this.mouseTimeout)
}
}
if (this.usingElectron && this.powerSaveBlocker !== null) {
const { powerSaveBlocker } = require('electron')
powerSaveBlocker.stop(this.powerSaveBlocker)
}
},
methods: {
initializePlayer: async function () {