pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pressing numbers jumps to that %

Pas 99d3e11b a16c8402

+11
+11
src/components/player/internals/KeyboardEvents.tsx
··· 17 17 const { isSeeking } = usePlayerStore((s) => s.interface); 18 18 const mediaPlaying = usePlayerStore((s) => s.mediaPlaying); 19 19 const time = usePlayerStore((s) => s.progress.time); 20 + const duration = usePlayerStore((s) => s.progress.duration); 20 21 const { setVolume, toggleMute } = useVolume(); 21 22 const isInWatchParty = useWatchPartyStore((s) => s.enabled); 22 23 ··· 58 59 isSeeking, 59 60 isRolling, 60 61 time, 62 + duration, 61 63 router, 62 64 setDelay, 63 65 delay, ··· 87 89 isSeeking, 88 90 isRolling, 89 91 time, 92 + duration, 90 93 router, 91 94 setDelay, 92 95 delay, ··· 114 117 isSeeking, 115 118 isRolling, 116 119 time, 120 + duration, 117 121 router, 118 122 setDelay, 119 123 delay, ··· 259 263 dataRef.current.display?.setTime(dataRef.current.time + 1); 260 264 if (k === "," && dataRef.current.mediaPlaying?.isPaused) 261 265 dataRef.current.display?.setTime(dataRef.current.time - 1); 266 + 267 + // Skip to percentage with number keys (0-9) 268 + if (/^[0-9]$/.test(k) && dataRef.current.duration > 0) { 269 + const percentage = parseInt(k, 10) * 10; // 0 = 0%, 1 = 10%, 2 = 20%, ..., 9 = 90% 270 + const targetTime = (dataRef.current.duration * percentage) / 100; 271 + dataRef.current.display?.setTime(targetTime); 272 + } 262 273 263 274 // Utils 264 275 if (keyL === "f") dataRef.current.display?.toggleFullscreen();