Add scene transitions, music mixing, captions, and interactivity to V2 player#578
Merged
NextMonthLab merged 4 commits intomainfrom Feb 13, 2026
Merged
Conversation
…activityNode overlay between scenes based on manifest interactivityNodes https://claude.ai/code/session_011izHphSuXPrgDCtVZW8a2J
…om manifest, applies preset typography/color/background tokens with responsive sizing https://claude.ai/code/session_011izHphSuXPrgDCtVZW8a2J
…dioMixer for Web Audio API gain routing https://claude.ai/code/session_011izHphSuXPrgDCtVZW8a2J
… configurable duration from manifest https://claude.ai/code/session_011izHphSuXPrgDCtVZW8a2J
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
This PR significantly enhances the V2 player with cinematic scene transitions, background music with audio ducking, styled caption rendering, and interactive character chat overlays. The player now supports smooth crossfade and fade-to-black transitions between scenes, manages audio mixing for music and narration, and displays captions with customizable styling from the manifest.
Key Changes
Scene Transitions
crossfade,fade-to-black, andcutstylesgetBoundingClientRect()reflow forcing to ensure CSS transitions animate correctlyAudio Mixing & Music
useAudioMixerhook to manage background music and narration playback<audio>element for background music with loop supportCaption Rendering
CaptionOverlaycomponent with responsive, token-based stylingclamp()CSS for font sizing instead of fixed pixelsInteractivity
dismissNode()callback to close interactivity overlay and advance to next sceneInteractivityNodecomponent with character list and chat functionalitySceneRenderer Updates
connectNarrationcallback to wire narration audio to the mixercaptionSettingstoCaptionOverlayfor styled caption renderingplayevent andendedeventuseScenePlayback Hook
activeNodeIdand providedismissNodecallbackonSceneCompletenow checks for interactivity nodes before advancingNotable Implementation Details
useRefto track previous/outgoing scene indices and manage timeout cleanupgetBoundingClientRect()to force browser reflow between setting initial and target opacity valuesclamp()https://claude.ai/code/session_011izHphSuXPrgDCtVZW8a2J