remotion-dev/remotion

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 in remotion 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.

Thanks for filing, this is a valid issue! It will not be slower if you use Loop though, Remotion will not download it multiple times. Still I think it would be a nicer API!

posted by JonnyBurger over 2 years ago

@jonnyburger has funded $167.00 to this issue.


posted by issuehunt-app[bot] over 2 years ago

Hi @JonnyBurger

I'd like to take this issue on! Thanks

posted by DerrykBoyd over 2 years ago

@DerrykBoyd Nice, good luck! Assigned you

posted by JonnyBurger over 2 years ago

I'd love to work on this if @DerrykBoyd doesn't have the time to do it, let me know :) !

posted by Pompette over 2 years ago

Derryk, please confirm you still want to take it!

posted by JonnyBurger over 2 years ago

Derryk, please confirm you still want to take it

Confirmed. I'm hoping to work on this at the weekend.

posted by DerrykBoyd over 2 years ago

Cool! @Pompette More issues are coming before this weekend šŸ˜„

posted by JonnyBurger over 2 years ago

Hey @JonnyBurger

I tried this out tonight, but I ended up getting a little stuck. I may need some help.

I tried to follow the general steps in the description and I can get the video looping, but there seems to be two videos playing and one just overlays on top showing the last frame all the time.

What's the best way for me to share my work and get feedback? Just open up a draft PR maybe? Even though I'm nowhere near completing this.

posted by DerrykBoyd over 2 years ago

@jonnyburger has rewarded $150.30 to @derrykboyd. See it on IssueHunt

  • :moneybag: Total deposit: $167.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $16.70
posted by issuehunt-app[bot] over 2 years ago

Fund this Issue

$167.00
Rewarded

Rewarded pull request

Recent activities

derrykboyd was rewarded by jonnyburger for remotion-dev/remotion# 1300
over 2 years ago
jonnyburger submitted an output to  remotion-dev/ remotion# 1300
over 2 years ago