Fix sticker blinking and audio library export issues#148
Merged
Conversation
- Changed layerId from dynamic clip.id-evalTime to static clip.id - Prevents recreation of Lottie players, text canvases, and WebGL textures on every frame - Resolves blinking issue and improves rendering performance - Audio layers now use consistent clip.id-audio format
- Updated getActiveAudioClips to check for direct audioPath fallback property - Allows export of audio library items that aren't in project media assets - Mirrors preview player logic for consistent audio handling - Resolves issue where dedicated audio clips weren't exported
theunavailableguy
approved these changes
Jul 12, 2026
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 fixes two critical issues:
1. Sticker/Text Blinking Issue
Problem: Stickers and text were blinking/flickering during playback and export.
Root Cause: The timeline evaluator was generating unique layer IDs containing the frame time (
${clip.id}-${evalTime}) on every frame. This caused the rendering engine to destroy and recreate Lottie players, text canvases, and WebGL textures on every frame, resulting in visible blinking.Solution: Changed to static, consistent layer IDs (
clip.idandclip.id-audio). This allows the engine to reuse resources across frames, eliminating blinking and significantly improving performance.2. Audio Library Export Issue
Problem: Audio clips from the audio library weren't being exported with the video.
Root Cause: Audio library items are deliberately kept out of the project's media assets list to avoid cluttering the media upload tab. However, the export's audio filter only checked clips that mapped to a project asset, so library items were ignored.
Solution: Updated
getActiveAudioClipsto recognize and export clips that have a directaudioPathfallback property, mirroring the preview player's logic.Changes
src/core/evaluation/evaluator.ts: Use static layer IDs instead of dynamic time-based IDssrc/core/timeline/audioClips.ts: Support direct audioPath fallback for audio library clipsTesting
All existing tests pass. Both issues have been verified as resolved.