Show spinner when audio/video is stalled

Fixes #243
This commit is contained in:
DC
2016-03-28 18:49:15 -07:00
parent bf3f2e51fe
commit 4c23643b5e
4 changed files with 52 additions and 6 deletions

View File

@@ -284,6 +284,15 @@ function dispatch (action, ...args) {
state.playing.isPaused = true
ipcRenderer.send('unblockPowerSave')
}
if (action === 'mediaStalled') {
state.playing.isStalled = true
update()
}
if (action === 'mediaTimeUpdate') {
state.playing.lastTimeUpdate = new Date().getTime()
state.playing.isStalled = false
update()
}
if (action === 'toggleFullScreen') {
ipcRenderer.send('toggleFullScreen', args[0] /* optional bool */)
}