etro-js / etro

Typescript video-editing framework for the browser
https://etrojs.dev
GNU General Public License v3.0
859 stars 86 forks source link

:sparkles: Added optional onDraw method to `play` to run after the _render call. #266

Closed abidjappie closed 6 months ago

abidjappie commented 6 months ago

Description

Implements an optional callback that gets run after every Movie._render()

resolves: https://github.com/etro-js/etro/issues/230

abidjappie commented 6 months ago

Hey Abid, thanks so much for contributing. Sorry for the delay, got a bit sidetracked with other stuff. The onDraw method should run every visual frame (each time we call _render to draw the frame onto the canvas).

I updated the logic, let me know if I'm on the right track. 🙇