dkaoster / scrolly-video

Components for scroll-based (or other externally controlled) playback.
https://scrollyvideo.js.org/
MIT License
965 stars 39 forks source link

feat: ready callback #98

Closed tarsisexistence closed 4 months ago

tarsisexistence commented 6 months ago

It might solve https://github.com/dkaoster/scrolly-video/issues/46

RewrotedecodeVideo a little bit for better readability (more linear reading with early return and async-await)

Btw, you do catch first because sometimes it can just produce the empty array by default without catch, right? As I understand, you put catch first to "normalize" an empty array and catch both cases later in the last then. Because I wanted to move catch to the bottom but then I understood that it might be a normalization.

polyrhythmatic commented 5 months ago

Anything I can do to help merge? Could use this feature right now!

tarsisexistence commented 4 months ago

@dkaoster it will be applied to svelte and vue by default with other props, because of restProps

svelte

const { videoPercentage, ...restProps } = $$props;

vue

const { videoPercentage, ...restProps } = this.$attrs;

So, probably we can merge it, right?