diff --git a/src/components/player/internals/KeyboardEvents.tsx b/src/components/player/internals/KeyboardEvents.tsx index 6373b0b5..3a833e76 100644 --- a/src/components/player/internals/KeyboardEvents.tsx +++ b/src/components/player/internals/KeyboardEvents.tsx @@ -94,7 +94,8 @@ export function KeyboardEvents() { // Video playback speed if (k === ">" || k === "<") { const options = [0.25, 0.5, 1, 1.5, 2]; - const idx = options.indexOf(dataRef.current.mediaPlaying?.playbackRate); + let idx = options.indexOf(dataRef.current.mediaPlaying?.playbackRate); + if (idx === -1) idx = options.indexOf(1); const nextIdx = idx + (k === ">" ? 1 : -1); const next = options[nextIdx]; if (next) dataRef.current.display?.setPlaybackRate(next);