Repository navigation
feat(video): add storyboard-based video hover previews (#429) - #455
Open
Captain-Vikram wants to merge 5 commits into
Open
Captain-Vikram wants to merge 5 commits into
Captain-Vikram wants to merge 5 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Phase 1 of the Video Hover Preview feature (#429) across feed, search, and channel video cards using YouTube storyboard sprite sheets.
1. Backend Storyboard Extraction & Caching (Rust)
get_video_storyboardTauri command viaInnertubeClient.PlayerFlights.2. Frontend Architecture & Playback Isolation
<video>media tags or touchesusePlayerStore, avoiding audio leaks, media session hijacking, or background playback interruption.useHoverPreviewStore) guarantees strictly one active preview across the entire application.video_hover_previews_enabled) in Settings > Content with localized strings.3. High-Fluidity 3-Section Storyboard (24 Frames @ 8 FPS)
performance.now()elapsed-time indexing (elapsed % totalDurationMs) to permanently eliminate JS timer drift under UI or render load..animate-section-crossfade) on section boundaries (Opening → Middle → Later), softening scene jumps while preserving crisp 0 ms updates within each 8-frame section.24 frames × 125 ms = 3,000 ms).(frameIdx + 1) % frames.length). Resets immediately when unhovered.bg-primary) sweeps across the bottom edge of the thumbnail in sync with playback (with 0 ms reset transition on loop restart).4. Edge Case Handling & Cross-Platform Safeguards
overflow: hidden, centered horizontally). Completely fixes the 3-frame bleed bug for vertical/portrait (9:16) videos while preserving pillarboxing.proxiedImage(url, proxyBase)viauseImageProxyStoreto prevent GnuTLS certificate errors.img.decode()) off the main thread before revealing the preview.Related issue
Closes #429
Change type
Validation
vitestpassing (23/23tests across hover preview suites):src/lib/useHoverPreview.test.ts(8 tests)src/components/video/VideoThumbnailPreview.test.ts(7 tests)src/store/useHoverPreviewStore.test.ts(4 tests)src/lib/seekPreview.test.ts(4 tests — seek scrubber untouched)cargo test --lib storyboardpassing (3/3tests insidesrc-tauri)pnpm build(tsc && vite buildcompleted with 0 errors)Risk and compatibility
<video>elements or interfere with background audio.prefers-reduced-motionto respect accessibility settings.