1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-30 16:17:41 +01:00

Remove seeking with numbers.

This commit is contained in:
qtchaos 2023-12-28 22:18:47 +02:00
parent c3494c2f84
commit 27b28a6d96
No known key found for this signature in database
GPG key ID: 7DA98B2B9EF06A90

View file

@ -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();