Browse Source

Remove seeking with numbers.

pull/612/head
qtchaos 2 years ago
parent
commit
27b28a6d96
No known key found for this signature in database
GPG Key ID: 7DA98B2B9EF06A90
  1. 8
      src/components/player/internals/KeyboardEvents.tsx

8
src/components/player/internals/KeyboardEvents.tsx

@ -113,14 +113,6 @@ export function KeyboardEvents() { @@ -113,14 +113,6 @@ export function KeyboardEvents() {
dataRef.current.display?.setTime(dataRef.current.time + 1);
if (k === "," && dataRef.current.mediaPlaying?.isPaused)
dataRef.current.display?.setTime(dataRef.current.time - 1);
if (/\d/.exec(k) && !dataRef.current.isSeeking) {
const num = parseInt(k, 10);
if (num === 0) dataRef.current.display?.setTime(0);
const percent = num / 10;
dataRef.current.display?.setTime(
dataRef.current.mediaProgress.duration * percent,
);
}
// Utils
if (k === "f") dataRef.current.display?.toggleFullscreen();

Loading…
Cancel
Save