Repository navigation
Slice 10 — Folder audio + soundtrack playback (#11) - #29
Merged
Merged
Conversation
Themes are settings data; soundtrack is a RenderPlan audio track with constant volume, persisted in slideshow.json and selectable from the editor shell. Co-authored-by: Cursor <cursoragent@cursor.com>
@remotion/media Audio blocks on WebCodecs decode for blob URLs; use Html5Audio from remotion instead. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
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.
Closes #11
Approach
Folder audio (MP3/M4A/WAV) is detected separately from visual media and offered as soundtrack choices in a new
SoundtrackPanel. Selection is persisted assoundtrackFilenameinslideshow.json. The Sequence Planner attaches a constant-volumesoundtracktoRenderPlan; the Composition plays it from frame 0 viaHtml5Audio(Player-safe with blob URLs).Pure modules (TDD)
timeline-core/media.ts—isSupportedAudio(); visualisSupportedMedia()unchanged (audio excluded from storyboard)sequence-planner/planner.ts— optionalSoundtrackInput→RenderPlan.soundtrackwithvolume: 1;totalFramesindependent of track lengthproject-store/audio-loader.ts—enumerateAudioTracks()with Mediabunny duration; blob URL lifecycle helpersproject-store/schema.ts—soundtrackFilename?: stringonSlideshowJsonUI
SoundtrackPanel— dropdown when folder contains audio; hidden when noneApp.tsx— parallel audio enumeration on folder open/refresh; autosave includes soundtrack; plan wired with selected trackPlayback fix
@remotion/mediaAudioblocks the Player on WebCodecs decode for blob URLs (delayRendernever completes). Switched soundtrack toHtml5AudiofromremotioninsideAbsoluteFill.Acceptance criteria
enumerateAudioTracks;SoundtrackPanellists tracks; storyboard shows photos only — Playwright smoke)Html5Audioat frame 0;soundtrackFilenameinslideshow.json; validated on reopen against enumerated tracks)loopprop;totalFramesunchanged by track duration; planner test confirms independence)Code review verdict
APPROVE (4/5)
Blocking findings: none
Non-blocking:
App.tsxnow ~358 lines (over 300-line target);audio-loader.tshas no colocated FS-fake tests (same gap asmedia-loader.ts);SoundtrackTrack.durationInFramesstored but not consumed by Composition yet (scaffolding for beat sync).Test plan
pnpm test(135 tests)pnpm buildpnpm linttest-fixtures/demo, selecttheme.wav, play advances (pause button appears)Follow-ups
App.tsxinto a hook when next touching editor shellSoundtrackPanelwhen folder has no audio (panel currently hidden)Made with Cursor