# HG changeset patch # User drewp@bigasterisk.com # Date 2019-06-10 23:50:04 # Node ID b64a4db527e2a5f4c95168b670447cb92f6b795b # Parent f5fbc6ec5f8781588118154ff5771e139f23e5a9 whitespace Ignore-this: 82ab84810df09d549904116da2c3e4b8 diff --git a/light9/web/light9-vidref-replay.js b/light9/web/light9-vidref-replay.js --- a/light9/web/light9-vidref-replay.js +++ b/light9/web/light9-vidref-replay.js @@ -19,6 +19,7 @@ class Light9VidrefReplay extends LitElem size: { type: String, attribute: true } }; } + estimateRate() { const n = this.songToVideo.length; const x0 = Math.round(n * .3); @@ -27,6 +28,7 @@ class Light9VidrefReplay extends LitElem const pt1 = this.songToVideo[x1]; return (pt1[1] - pt0[1]) / (pt1[0] - pt0[0]); } + setVideoTimeFromSongTime(songTime, isPlaying) { if (!this.songToVideo || !this.outVideo || this.outVideo.readyState < 1) { return; @@ -64,6 +66,7 @@ class Light9VidrefReplay extends LitElem this.timeErr = 0; } } + setRate(r) { this.playRate = Math.max(.1, Math.min(4, r)); this.outVideo.playbackRate = this.playRate; @@ -103,7 +106,7 @@ class Light9VidrefReplay extends LitElem color: rgb(97, 97, 255); } video { - width: 100%; + width: 100%; } `; } @@ -111,7 +114,8 @@ class Light9VidrefReplay extends LitElem render() { let details = ''; if (this.size != 'small') { - details = html`