Disable playback controls while in external player (#909)

This commit is contained in:
Adam Gotlib
2016-09-07 22:13:50 +02:00
committed by DC
parent 8da5b955d6
commit d88229694a
3 changed files with 12 additions and 7 deletions

View File

@@ -58,7 +58,7 @@ function init () {
*/
ipc.on('onPlayerOpen', function () {
menu.setPlayerOpen(true)
menu.togglePlaybackControls(true)
powerSaveBlocker.enable()
shortcuts.enable()
thumbar.enable()
@@ -70,7 +70,7 @@ function init () {
})
ipc.on('onPlayerClose', function () {
menu.setPlayerOpen(false)
menu.togglePlaybackControls(false)
powerSaveBlocker.disable()
shortcuts.disable()
thumbar.disable()
@@ -126,7 +126,12 @@ function init () {
})
})
ipc.on('openExternalPlayer', (e, ...args) => externalPlayer.spawn(...args))
ipc.on('openExternalPlayer', (e, ...args) => {
menu.togglePlaybackControls(false)
thumbar.disable()
externalPlayer.spawn(...args)
})
ipc.on('quitExternalPlayer', () => externalPlayer.kill())
// Capture all events