changeset 2017:d7ea6d473bf6

don't let <video> play and get corrected when we're out of bounds, which made a bad flicker Ignore-this: 2eb8ea8a5399b7ccd00841654ff620f0
author drewp@bigasterisk.com
date Mon, 10 Jun 2019 23:15:55 +0000
parents c29a2c449a8a
children 5b157494a741
files light9/web/light9-vidref-replay.js
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/light9/web/light9-vidref-replay.js	Mon Jun 10 04:54:45 2019 +0000
+++ b/light9/web/light9-vidref-replay.js	Mon Jun 10 23:15:55 2019 +0000
@@ -33,6 +33,10 @@
         }
         const i = _.sortedIndex(this.songToVideo, [songTime],
                                 (row) => { return row[0]; });
+        if (i == 0 || i > this.songToVideo.length - 1) {
+            isPlaying = false;
+        }
+        
         this.videoTime = this.songToVideo[Math.max(0, i - 1)][1];
 
         this.outVideoCurrentTime = this.outVideo.currentTime;