Skip to content

@remotion/studio: Skip mounting volume overlay canvas when volume is default#7762

Merged
JonnyBurger merged 1 commit into
mainfrom
jonnyburger/issue-7760-pr
May 28, 2026
Merged

@remotion/studio: Skip mounting volume overlay canvas when volume is default#7762
JonnyBurger merged 1 commit into
mainfrom
jonnyburger/issue-7760-pr

Conversation

@JonnyBurger
Copy link
Copy Markdown
Member

Summary

  • Skip mounting the volume overlay canvas in AudioWaveform when volume is not dynamic
  • Keep overlay rendering behavior unchanged for dynamic string-based volume automation

Testing

  • bun run build
  • bun run formatting

Closes #7760

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment May 28, 2026 4:42pm
remotion Ready Ready Preview, Comment May 28, 2026 4:42pm

Request Review

@JonnyBurger JonnyBurger changed the title @remotion/studio: Skip mounting volume overlay canvas when volume is default @remotion/studio: Skip mounting volume overlay canvas when volume is default May 28, 2026
Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — Skip mounting the volume overlay canvas in AudioWaveform when volume is a static number rather than a dynamic string-based automation.

  • Introduce shouldRenderVolumeOverlay — Derived from doesVolumeChange && typeof volume === 'string', replacing the inline early-return guard inside the volume overlay useEffect.
  • Conditionally render the volume canvas — The <canvas ref={volumeCanvas}> element is now only mounted in the DOM when volume automation is present, avoiding an unnecessary DOM node.
  • Update effect dependencies — The volume overlay useEffect dependency array now keys off shouldRenderVolumeOverlay instead of doesVolumeChange, which is equivalent because the boolean is derived from the same inputs.

Pullfrog  | View workflow run | Using Kimi K2𝕏

@JonnyBurger JonnyBurger merged commit 83a8a40 into main May 28, 2026
19 checks passed
@JonnyBurger JonnyBurger deleted the jonnyburger/issue-7760-pr branch May 28, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[@remotion/studio] Skip mounting volume overlay canvas when volume is default

1 participant