Video player polish

No header on Linux and OSX, just a back button on mouseover

ESC exits fullscreen, or if already not in fullscreen, goes back

More accurate scrub position

Removed the calc(100% -38x) hack, replaced with flexbox
This commit is contained in:
DC
2016-03-05 06:12:02 -08:00
parent 59b3bd04a9
commit e4f2716d06
4 changed files with 49 additions and 5 deletions

View File

@@ -84,6 +84,17 @@ function init () {
electron.ipcRenderer.send('addTorrentFromPaste')
})
document.addEventListener('keydown', function (e) {
console.log('keydown ' + e.which)
if (e.which === 27) { /* ESC means either exit fullscreen or go back */
if (state.view.isFullScreen) {
dispatch('toggleFullScreen')
} else {
dispatch('back')
}
}
})
window.addEventListener('focus', function () {
state.view.isFocused = true
if (state.view.dock.badge > 0) electron.ipcRenderer.send('setBadge', '')