Stop power save blocker on route leave
This commit is contained in:
parent
0295354ffd
commit
5663d56b12
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue