Windows Thumbnail Bar

* While in the player view, show a play/pause toggle in the thumbnail
This commit is contained in:
Gediminas Petrikas
2016-04-23 21:34:49 +03:00
committed by DC
parent 7526b18507
commit 15f733f11c
6 changed files with 49 additions and 0 deletions

View File

@@ -372,14 +372,18 @@ function pause () {
function playPause () {
if (state.location.url() !== 'player') return
if (state.playing.isPaused) {
play()
} else {
pause()
}
// force rerendering if window is hidden,
// in order to bypass `raf` and play/pause media immediately
if (!state.window.isVisible) render(state)
ipcRenderer.send('updateThumbnailBar', state.playing.isPaused)
}
function jumpToTime (time) {