From 0f2a523cc2e41cd2f20892b72a85a6479e1af207 Mon Sep 17 00:00:00 2001 From: cottongin Date: Tue, 22 Sep 2026 19:46:46 -0400 Subject: [PATCH] fix: QuickTime-style floating controls pill, speed selector, rate sync Co-authored-by: Cursor --- src/lib/components/PlayerControls.svelte | 127 ++++++++++++----------- 1 file changed, 64 insertions(+), 63 deletions(-) diff --git a/src/lib/components/PlayerControls.svelte b/src/lib/components/PlayerControls.svelte index 906d94b..a3b2ac2 100644 --- a/src/lib/components/PlayerControls.svelte +++ b/src/lib/components/PlayerControls.svelte @@ -127,11 +127,12 @@ onOpenCaptionSettings(); } - // Sync PiP/fullscreen state periodically + // Sync PiP/fullscreen/rate state periodically $effect(() => { const interval = setInterval(() => { pipActive = isPiPActive(); fullscreenActive = isFullscreenActive(); + currentRate = getPlaybackRate(); }, 500); return () => clearInterval(interval); }); @@ -149,56 +150,10 @@ aria-label="Player controls" >
- -
-
-
-
-
- {#if hoverTime !== null} -
- {formatTime(hoverTime)} -
- {/if} -
- - +
- +
- - - - -
- +
- - {formatTime(session.currentTime)} - / - {formatTime(session.duration)} - + + +
@@ -232,7 +200,7 @@
@@ -273,15 +241,47 @@ >{fullscreenActive ? '⤓' : '⛶'}
+ + +
+
+
+
+
+ {#if hoverTime !== null} +
+ {formatTime(hoverTime)} +
+ {/if} +
+ + +
+ {formatTime(session.currentTime)} + {formatTime(session.duration)} +