1
0
mirror of https://github.com/videojs/video.js.git synced 2025-02-08 12:05:47 +02:00

fixed cue search algorithm bug

This commit is contained in:
Bart Nagel 2011-12-16 00:52:15 -08:00
parent 6945be3d6e
commit 0e81c6b059

View File

@ -88,7 +88,7 @@ _V_.Track.prototype = {
// Meaning the user is scrubbing in reverse or rewinding
reverse = (this.cues[this.lastCueIndex].startTime > time),
// If reverse, step back 1 becase we know it's not the lastCue
i = this.lastCueIndex - (reverse) ? 1 : 0;
i = this.lastCueIndex - (reverse ? 1 : 0);
while (true) { // Loop until broken
if (reverse) { // Looping in reverse
// Stop if no more, or this cue ends before the current time (no earlier cues should apply)