Sorry, I'll try to explain it better:
This is the updated Version.
https://codepen.io/BastiArts/pen/jOGeebj
Instead of using the Scrolltrigger.batch() Method, I fetch my sections using gsap.utils.toArray() and looping through them.
This causes all my video-sections to initialize & fetch all images of the sequences.
When using the batch-Method, I was able to initialize only the visible section(s) in the viewport (onEnter Event). So just the necessary images were fetched when the box is entering the viewport. Ideally the frames of the next video box should be loaded one section ahead.
This will reduce the initial pageload and make sure, that the majority of the frames are loaded when the users scrolls through the video section.
This brings me to my question:
- How do I check, if a section enteres the viewport?