ensure video is paused before hiding window

This commit is contained in:
Dan Flettre
2016-03-11 01:10:39 -06:00
parent 0199ff957c
commit b1678b71c6
3 changed files with 16 additions and 4 deletions

View File

@@ -197,9 +197,15 @@ function dispatch (action, ...args) {
// window.history.forward()
}
if (action === 'pause') {
if (state.url !== 'player' || state.video.isPaused) {
ipcRenderer.send('paused-video')
}
state.video.isPaused = true
update()
}
if (action === 'videoPaused') {
ipcRenderer.send('paused-video')
}
if (action === 'playPause') {
state.video.isPaused = !state.video.isPaused
update()