etro-js / etro

Typescript video-editing framework for the browser

Home Page:https://etrojs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom duration for `play()`

clabe45 opened this issue · comments

Custom duration for `play()`

Would it be possible to get more context on this? I'd love to tackle it.

Would duration just be a number that represents seconds? And is the idea just that if play() is passed a duration, the move would just play for that many seconds?

Hey, yes to both. It would be a number in seconds, and it would stop after that many seconds passes. The record function already supports a duration, you can use that for reference.

@clabe45 for this to work, do we just need to update this._endTime to be this.currentTime + duration?

Yeah, move the assignment from stream to play (stream calls play)

I have #208 for this