Repository navigation
feat(studio): redesign player scrubber with Studio Console deck and chapter track - #9222
miguel-heygen wants to merge 1 commit into
Conversation
jrusso1020
left a comment
There was a problem hiding this comment.
Reviewed at 019ba37dd821f351ed34f6daf3ecef48e113cd8a. Read in full: PreviewSeekBar.tsx, scrubberMarkers.ts, the PlayerControls.tsx diff with the base file beside it, and the playback keyboard path (usePlaybackKeyboard.ts, playbackShortcuts.ts, core typingTarget.ts). The two CSS files I read as hunks only (motion, focus, raw colours); I did not judge the look.
No blocker. Approving.
What I checked
- The native range is still the control:
aria-label,aria-valuetext,min/max,disabledand the settled / unsettled seek contract are the same as on main (pointer scrub unsettled, release and keys settled). - The new arrow handling on the range does not double up with the global frame-step keys: the range is an
input, soshouldIgnorePlaybackShortcutTargetalready leaves its keys alone. - The steppers start from the right time after a remount:
TimecodeToggleButtonseedscurrentTimeReffrom the store before the first clock tick. - Playback does not re-render the bar: knob, fills and the timecode are painted through refs from
liveTime. - The reduced-motion block covers every element that has a transition.
Ran in a checkout of this head: PreviewSeekBar.test.tsx, PlayerControls.test.tsx, ShortcutsPanel.test.tsx, PreviewPane.test.tsx, lib/time.test.ts and the style gate tests: 11 files, 94 tests pass. Not run: a browser, the build, lint and typecheck (CI had 24 checks pending, none failed, when I posted).
Nits, none blocking
- Reuse
PlayerControls.tsxstepFrame:lib/time.tsalready hasstepFrameTime(time, deltaFrames, fps), which the arrow keys use (usePlaybackKeyboard.ts). It snaps to the frame grid;currentTime + delta / fpsdoes not, so from 0.5123 s the button lands on 0.5456 s while the key lands on 16/30. Suggested:onSeek(Math.min(duration, stepFrameTime(currentTimeRef.current, delta, compositionFps())), { settled: true }). deriveScrubberMarkersmakes a marker from every timeline element that starts after 0.15 s, whatever its kind (audio, text, image, expanded sub-composition children), and calls each one a scene. A project with many clips gets a dot and a tab stop per clip (only starts within 0.25 s of each other merge). The marker row also comes before the range in the DOM, so keyboard users tab through every marker to reach the slider. Suggested: keepcomposition/videokinds only (the sort already knows them), or cap the count, and give the marker buttonstabIndex={-1}since the slider already reaches every point.SeekRangeInputonPointerMovecallssetUiwith a new object on every move, so the whole bar and each marker re-render while the pointer moves. ReturnprevwhennearMarkerIdandhoveredSegIdxdid not change.handleKeyDowndoes not look at Cmd / Ctrl / Alt, so a modified arrow on the focused slider is also taken as a seek. Return early when one of them is held.- On the slider an arrow is 0.2 s (1 s with Shift); everywhere else it is 1 frame (10 with Shift). Worth one line in the shortcuts panel, or the same step.
Need: yes, a product design choice by the Studio owner · Size: ok for one visual change (1,251 added, 301 of them CSS, 141 tests) · Reuse: stepFrameTime for the steppers (nit 1) · Simpler: marker derivation could filter by kind instead of deduplicating everything (nit 2) · Structure: fine (checked lib/time.ts helpers, usePlaybackKeyboard step path, studioKeyDefaults; the pure marker math sits in its own module, no split needed)
Risk: low — Studio preview transport only, no data or render path; worst case is a cosmetic or keyboard-order regression.
Rames
Edit accuracy: accurate 275 (base branch 275), smooth 77 of thoseThe gate passes. Quarantined, measured but not gated (0) |
Summary
Upgrades OSS Studio's preview playback scrubber (
PreviewSeekBarandPlayerControls) to the Studio Console design:.hf-scrubber-deck) harmonized with the dark preview stage in both dark and light (paper) Studio themes.usePlayerStore((s) => s.elements)with crisp cut gaps, etched micro-ticks, per-segment hover expansion, and satin played fill.--hf-knob-angle), lifting gently on pointer hover and compressing on active press (prefers-reduced-motionrespected).MM:SS.t · <Scene>callout, and clicking any marker jumps straight to that cut.<input type="range" aria-label="Seek preview">so screen-reader semantics (aria-valuetext,min,max,disabled), keyboard seeking (ArrowLeft/ArrowRight/ArrowUp/ArrowDown,Shift+Arrow,PageUp/PageDown,Home/End), and visible:focus-visiblering on the dial all work seamlessly.All colors and gradients are tokenized in
packages/studio/src/styles/theme.css(--hf-scrubber-*).Before
Before this change (
main,registry/examples/product-promofixture): bare native range input with flat grey track, plain white thumb, no scene markers, no hover timecode, and no frame steppers.After
After this change (
registry/examples/product-promofixture): floating Studio Console deck, chapter-segmented micro-tick track with cut gaps, rotating knurled brushed-aluminum dial, scene markers (00:01.5,00:14.0), hover/drag time+scene tooltip, keyboard focus ring, and 1-frame steppers.Live Motion Walkthrough
Hovering chapter segments, inspecting and clicking a scene marker, scrubbing across a cut with rotating metallic sheen, stepping frame by frame, and switching Studio themes:
https://static.heygen.ai/hyperframes-oss/pr-captures/studio-console-scrubber-v1/studio-console-scrubber-motion.mp4
Interactive States (2x Captures)
00:00(floating deck + chapter cuts + scene pearls)00:14.0 · Scene 5 Logo Outro)00:11.2 · Scene 2 4 Canvas, rotated sheen, highlighted segment):focus-visibleon native range input)paperStudio theme contextVerification
fails without the fix: the new unit tests in
packages/studio/src/player/components/PreviewSeekBar.test.tsx(scene marker derivation/deduplication, chapter segment rendering, marker jump + hover tooltip,Home/End/Shift+Arrow/PageUp/PageDownkeyboard seek, dial rotation onliveTime) andpackages/studio/src/player/components/PlayerControls.test.tsx(Studio Console deck + 1-frame steppers) fail againstmainwithout these changes.2026and7771): 6/6 files passed (hexRatchet.test.ts,tokenGate.test.ts,PreviewSeekBar.test.tsx,PlayerControls.test.tsx,ShortcutsPanel.test.tsx,PreviewPane.test.tsx).oxfmt --check,oxlint(0 warnings, 0 errors),@hyperframes/studio typecheck(0 errors),@hyperframes/studio build(Vite + tsup ESM + DTS),check:studio-copy-dashes,check:tracked-artifacts, andlefthook(filesize,fallow,commitlint) all green.registry/examples/product-promoacross dark and lightpaperthemes, marker hover and click jump, continuous drag with dial sheen rotation, 1-frame step buttons, and keyboard focus ring with zero console/page errors.