Avoid deriving total frames from container duration when the audio tail mismatch is below the dynamic playback stall threshold. This prevents the rendering of phantom trailing frames that the playhead cannot reach during playback.
Also adds comprehensive unit and E2E tests covering both small and large audio tail gaps.
currentResolution state and currentSrcRef were only initialized on mount,
so if file.id changed without a remount the video.js init effect (keyed on
file.id) would re-create the player with a stale source. Add an effect
that resets them when file.id changes, before the init effect runs, making
the pane robust even without a per-asset key on the parent.
The single-file player fullscreened the inner video-area element, which
is not an ancestor of the control bar, so the bar was never visible in
fullscreen. Fullscreen the player root instead so the floating control
bar is included and the existing show-on-move / hide-after-idle logic
works (YouTube-style).
Also make the control-bar colors theme-aware in all cases. The fullscreen
floating overlay now uses bg-card/90 + backdrop-blur + foreground text
instead of a hardcoded dark overlay, so it follows the app light/dark
theme. The former themedChrome prop is renamed to floatOverlayInFullScreen
(default true = single-file floating overlay; compare passes false to keep
its bar in-flow).
Add a themedChrome prop to VideoControlBar that keeps the normal
theme-aware chrome (bg-card / foreground text) while fullscreen instead
of the dark video overlay. Compare mode passes it so its fullscreen bar
matches the app light/dark theme for both video- and image-active panes
(ImageControlBar is already themed). The single-file player is unchanged
(themedChrome defaults to false -> dark overlay). The fullscreen toggle
icon still reflects the actual fullscreen state.
Force the dark palette on the compare pane topbar (via a scoped `dark`
class + system tokens, no hardcoded hex) so the bar background is dark in
both light and dark app themes. Active pane text uses text-foreground
(white in the dark scope); inactive pane uses text-muted-foreground
(light gray).
The active version's topbar now uses an inverted bar (bg-foreground /
text-background) so it reads as black background with white text in the
light theme, while the inactive pane keeps the card background with muted
text. Filename/version text color now differs between active and inactive
panes.
Previously clicking a non-active video pane both switched the active
version and toggled playback. Now a click on an inactive pane only makes
it active; play/pause is only toggled when clicking the already-active
pane.
Extract the video player's inline ControlBar into an exported
viewers/video-control-bar.tsx (VideoControlBar + PlayerState +
DisplayTranscode) and the image toolbar from file-viewer into an exported
viewers/image-control-bar.tsx (ImageControlBar). video-player and
file-viewer now consume the shared components with unchanged behavior.
compare-control-bar composes the same two shared bars (video vs image
active) with fan-out handlers, so the compare control bar can no longer
drift from the single-file players (e.g. the time-format dropdown).
Add a Compare Versions mode to the file detail page (authenticated and
public share) that splits the viewer into two 50/50 panes showing two
versions side by side.
- Breadcrumb file menu gains a Compare Versions entry (version stacks
with >=2 versions); the file segment is hidden in compare mode.
- URL-driven state (compare/cmpLeft/cmpRight/cmpActive) on both file
routes so the view is refresh/share-safe.
- Per-side topbar with filename, version, version-switch dropdown, an
active-side highlight, and an X exit button.
- Shared control bar reflects the active pane; for same-type media it
coordinates both panes (play/pause, seek, frame-step, zoom, pan sync),
seekbar length matches the active side while the shorter side holds its
last frame; only the active side plays audio; resolution/download apply
to the active side; fullscreen covers the whole compare view.
- Right sidebar (comments/fields) binds to the active side; comment
selection seeks the active pane and annotations/comments can be created.
- Reuses useFramePlayer + DrawingCanvas without modifying the existing
single-file video player.
- Unit tests for compare selection/clamp logic.