mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-14 10:05:05 +01:00
Remove seeking with numbers.
This commit is contained in:
parent
c3494c2f84
commit
27b28a6d96
@ -113,14 +113,6 @@ export function KeyboardEvents() {
|
|||||||
dataRef.current.display?.setTime(dataRef.current.time + 1);
|
dataRef.current.display?.setTime(dataRef.current.time + 1);
|
||||||
if (k === "," && dataRef.current.mediaPlaying?.isPaused)
|
if (k === "," && dataRef.current.mediaPlaying?.isPaused)
|
||||||
dataRef.current.display?.setTime(dataRef.current.time - 1);
|
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
|
// Utils
|
||||||
if (k === "f") dataRef.current.display?.toggleFullscreen();
|
if (k === "f") dataRef.current.display?.toggleFullscreen();
|
||||||
|
Loading…
Reference in New Issue
Block a user