dkaoster / scrolly-video

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

Cant pause and continue video #113

Open bayerlse opened 3 months ago

bayerlse commented 3 months ago

Hey there, awesome lib!

I cant make it to pause and continue video within react. I tried different scenarios, eg. lock the videoPercentage prop and disable trackScroll. But when doing so the video gets unloaded and reloaded, which is bad ux.

Any suggestions, help?

Thanks, Sebi

bayerlse commented 3 months ago

I think creating a new instancing of src/ScrollyVideo.js within the first useEffect of src/ScrollyVideo.jsx causes this behaviour. There could be an internal cache for the loaded video beside the ScrollyVideo Class or a method for just updating values passed within the ScrollyVideo Class.

dkaoster commented 1 month ago

hi @bayerlse, sorry for the late response. Do you have a reproduction example?