remotion icon indicating copy to clipboard operation
remotion copied to clipboard

`<Loop>` component

Open JonnyBurger opened this issue 5 years ago • 11 comments

Issuehunt badges

A core component that will loop any of it's children indefinitely.

It should accept two props:

  • durationInFrames: The duration of the content to be looped
  • times: How many times to loop (optional, default Infinity)

It should only loop at most as many times to fill the whole composition length, but not any longer (can just call useVideoConfig() inside the loop component to figure out the max number of loops). Here is an example of how we loop at the moment: https://github.com/remotion-dev/remotion/discussions/615.

The component should throw descriptive errors on missing props or props with bad types, and documentation should be added to packages/docs


🎃 This issue is eligible for Hacktoberfest! In addition to helping you get a contribution towards your Hacktoberfest reward, Remotion pays a $100 bounty for it!

Read: How to contribute to Remotion

  • Let us know when you are interested in this issue, and we'll assign you!
  • In order to prevent issues from getting stuck, try to progress the issue by opening a PR and adding commits. If your progress is stale for 7 days, another user can ask to take over the issue.

Approval criteria for this issue

  • Implement the component as described above
  • Keep the pipeline green
  • Add documentation with a similar level of quality as the current docs

IssueHunt Summary

bpedersen bpedersen has been rewarded.

Backers (Total: $75.00)

Submitted pull Requests


Tips

JonnyBurger avatar Apr 17 '21 09:04 JonnyBurger

@jonnyburger has funded $75.00 to this issue.


issuehunt-oss[bot] avatar Apr 25 '21 13:04 issuehunt-oss[bot]

I can help with ffmpeg filters if needed 😉 But I don't have much knowledge of the remotion code base

Maxou44 avatar May 11 '21 06:05 Maxou44

@Maxou44 If you know how to implement loops with trimming support (start and end marker) and can give an example, it will help the implementation move forward faster for sure 😊

JonnyBurger avatar May 11 '21 08:05 JonnyBurger

as mentioned in #381 it would actually be cooler to have a <Loop> high order component so you can loop anything, not just audio and video! It's probably easier to implement and more versatile. So I am now leaning more towards this.

JonnyBurger avatar May 22 '21 12:05 JonnyBurger

Hey @JonnyBurger ! Can I take up this issue?

sohamsshah avatar Oct 03 '21 19:10 sohamsshah

@sohamsshah Sure thing! Good luck 🎃

JonnyBurger avatar Oct 03 '21 19:10 JonnyBurger

@JonnyBurger I would like to take this issue if there is no one working on it

bpedersen avatar Oct 13 '21 02:10 bpedersen

Sure go ahead 👍. Apologies for the delay; @JonnyBurger I will take up another issue later :)

sohamsshah avatar Oct 13 '21 04:10 sohamsshah

Just saw the reference to the Freeze approach. I will work on changing to that approach tonight.

bpedersen avatar Oct 15 '21 00:10 bpedersen

Updated to change the frame in the TimelineContext. Manually tested that this works with other nested Loop and Freeze also freezes the correct frame based on the nested loops.

bpedersen avatar Oct 15 '21 03:10 bpedersen

@jonnyburger has rewarded $67.50 to @bpedersen. See it on IssueHunt

  • :moneybag: Total deposit: $75.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $7.50

issuehunt-oss[bot] avatar Oct 16 '21 16:10 issuehunt-oss[bot]