Block power save (suspend) while casting (#403)

Fixes #397
This commit is contained in:
DC
2016-04-13 11:51:37 -07:00
parent ae168ae885
commit ee7e630177

View File

@@ -276,6 +276,9 @@ function dispatch (action, ...args) {
ipcRenderer.send('blockPowerSave')
}
if (action === 'mediaPaused') {
// When removing the <video>/<audio> tag to switch to Chromecast, it sends
// a false 'paused' event. Ignore that:
if (state.playing.location !== 'local') return
state.playing.isPaused = true
ipcRenderer.send('unblockPowerSave')
}