Skip to content

@remotion/media: Make media tags wrap in an invisible <Sequence> and allow from and durationInFrames props#6983

Merged
JonnyBurger merged 2 commits intomainfrom
sequence-media-props-p0p
Apr 4, 2026
Merged

@remotion/media: Make media tags wrap in an invisible <Sequence> and allow from and durationInFrames props#6983
JonnyBurger merged 2 commits intomainfrom
sequence-media-props-p0p

Conversation

@JonnyBurger
Copy link
Copy Markdown
Member

@JonnyBurger JonnyBurger commented Apr 4, 2026

Summary

Adds optional from and durationInFrames to <Video> and <Audio> in @remotion/media, implemented by wrapping content in an inner <Sequence layout="none" …> with showInTimeline={false} so timing matches <Sequence> semantics without an extra visible timeline row for that wrapper.

Testing

  • bunx turbo run make --filter='@remotion/media'

Documentation

  • Docs site update (not included in this PR; can follow if the API is finalized)

Tradeoffs

  • Nested timing: Users can still wrap <Video> in an outer <Sequence>; timing composes as with nested sequences.
  • Inner row hidden: The inner sequence is registered in Studio but filtered from the timeline list via showInTimeline={false}; the media row remains the primary visible clip.

Issues

(none linked)

@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog bot commented Apr 4, 2026

Reviewed PR #6983. The main feedback is that the unconditional <Sequence> wrapper changes the SequenceContext from null to non-null for all <Video>/<Audio> usages — even when from/durationInFrames aren't passed — which changes render asset ID strings. Suggested conditional wrapping to preserve backwards compatibility in the default case. Docs additions in the incremental push look clean.

Task list (5/5 completed)
  • Read and understand the full diff
  • Read changed files in full for context
  • Investigate Sequence wrapping behavior and unconditional wrapping concern
  • Verify render asset ID impact and timeline parent change
  • Submit review

Pullfrog  | View workflow run | Triggered by Pullfrog | Using Big Pickle (free) | 𝕏

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 4, 2026

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

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Apr 4, 2026 10:45am
remotion Ready Ready Preview, Comment Apr 4, 2026 10:45am

Request Review

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.

The <Sequence> wrapper is unconditional — it is always rendered even when the user does not pass from or durationInFrames. While frame computation, layout, and content gating are all unaffected (the defaults from=0, durationInFrames=Infinity, layout="none" are functionally transparent), the wrapper introduces a non-null SequenceContext where there was previously null. This changes the render asset ID strings generated by AudioForRendering and VideoForRendering.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Big Pickle (free) | 𝕏

@JonnyBurger JonnyBurger marked this pull request as ready for review April 4, 2026 15:21
@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog bot commented Apr 4, 2026

Reviewed PR #6983 — no actionable issues found. The <Sequence> wrapper approach is functionally safe for both the default case and when from/durationInFrames are provided. Review posted.

Task list (4/4 completed)

Pullfrog  | View workflow run | Triggered by Pullfrog | Using Big Pickle (free) | 𝕏

@JonnyBurger JonnyBurger merged commit 5d17f8d into main Apr 4, 2026
22 checks passed
@JonnyBurger JonnyBurger deleted the sequence-media-props-p0p branch April 4, 2026 15:21
@JonnyBurger JonnyBurger changed the title @remotion/media: Add optional from and durationInFrames with hidden inner Sequence @remotion/media: Make media tags wrap in an invisible <Sequence> and allow from and durationInFrames props Apr 4, 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.

Clean implementation. The unconditional <Sequence layout="none" from={0} durationInFrames={Infinity} showInTimeline={false}> wrapper is a behavioral no-op for the default case — useCurrentFrame(), useVideoConfig(), visibility gating, and DOM output are all unchanged when no from/durationInFrames is provided. The SequenceContext transitions from null to non-null, but all downstream branches (including the id generation in AudioForRendering/VideoForRendering and nested-Sequence offset calculations) produce functionally equivalent results for these default values. Docs version 4.0.445 is correct against current 4.0.444.

Pullfrog  | View workflow run | Using Big Pickle (free) | 𝕏

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.

1 participant