Basic placeholder UI for scrubbing preview

This commit is contained in:
David Ernst
2020-05-01 19:43:47 -07:00
parent cf0cf79440
commit 0b57961ff7
3 changed files with 49 additions and 0 deletions

View File

@@ -158,6 +158,18 @@ module.exports = class PlaybackController {
else this.state.playing.jumpToTime = time
}
preview (time, x) {
if (!Number.isFinite(time)) {
console.error('Tried to skip to a non-finite time ' + time)
return console.trace()
}
this.state.playing.preview = { time, x }
}
clearPreview () {
this.state.playing.preview = null
}
// Change playback speed. 1 = faster, -1 = slower
// Playback speed ranges from 16 (fast forward) to 1 (normal playback)
// to 0.25 (quarter-speed playback), then goes to -0.25, -0.5, -1, -2, etc