Repository navigation
export: ask for the video file before the offline render (user-gesture window) - #239
Merged
Merged
Conversation
…e window) "Shader video with sound" failed on a real song with SecurityError: the save dialog may only open while the user's click is still active (a few seconds), and the offline audio render of a 4-minute song takes longer than that. The video-only path never hit it because it asks for the file straight after the dialog. Now the file is picked first, then the song is rendered, then the handle is passed into exportVideo. The e2e counts picker calls: exactly one, up front. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Deploying webassemblymusic with
|
| Latest commit: |
d2f25fe
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://af9545f5.webassemblymusic.pages.dev |
| Branch Preview URL: | https://export-picker-first.webassemblymusic.pages.dev |
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.
What
Fixes
SecurityError: Failed to execute 'showSaveFilePicker' on 'Window': Must be handling a user gestureon "Shader video with sound" (#237) with a real-length song.The save dialog may only open within the click's user-gesture window (a few seconds). The offline audio render of a long song takes longer, so by the time
exportVideoasked for the file the gesture had expired. The video-only export never hit this because it asks straight after the dialog.pickVideoFile()exported fromfragmentshader.js;exportVideo()takes{ fileHandle }and only asks itself when none is given.videoaudiopath picks the file first, then compiles/renders at 48 kHz, then exports into the handle.🤖 Generated with Claude Code