remotion-dev/remotion










The issue has been solved
Loop argument on Video, Audio and OffthreadVideo #1300
B3nnjoe posted onGitHub
š This issue is part of our Hacktoberfest campaign! š Read more about Hacktoberfest here š This issue is currently assigned to @DerrykBoyd
Feature Request šļø
A loop argument on <Video/>
and <OffthreadVideo>
Since now you need to use the <Loop/>
and it needs to re-download the video for every iteration. (Correct me if im wrong.)
Acceptance criteria
- Accept a prop
loop
on the<Video>
,<OffthreadVideo>
and<Audio>
components. - It should work for development and rendering versions of the component.
- Mount the video/audio tag as normal and once the video is ready, get it's duration using a ref.
- Once the duration is read, use recursion - if the loop property is there, it should render the same component again but without the loop property. For example:
<Video loop src="video.mp3" />
will become<Loop><Video src="video.mp3" durationInFrames={xxx}/></Loop>
- Don't use the APIs in
@remotion/media-utils
- the components inremotion
should have no dependencies. - It should also work if the
src
of a video/audio changes! - It should use the
delayRender()
/continueRender()
pattern to ensure that the duration is determined before the render starts.