Refactor main.js: controllers.playback.skip() (#706)

* Fixes bug with Step Forward/Backward commands not working

* Fix 'invalid torrent identifier' error
This commit is contained in:
Adam Gotlib
2016-07-08 05:27:05 +02:00
committed by DC
parent a373141a93
commit 50c47dd657
5 changed files with 36 additions and 28 deletions

View File

@@ -86,6 +86,11 @@ module.exports = class PlaybackController {
ipcRenderer.send('onPlayerPause')
}
// Skip specified number of seconds (backwards if negative)
skip (time) {
this.skipTo(this.state.playing.currentTime + time)
}
// Skip (aka seek) to a specific point, in seconds
skipTo (time) {
if (isCasting(this.state)) Cast.seek(time)