Hi, so I’m experimenting with bubble and I wanted to try to create sort of a YouTube Shorts type feature that allows users to scroll vertically through a collection of videos. The videos will have scroll snapping and should play only when in the viewport.
So far I’ve achieved the vertical scroll snapping in my RepeatingGroup and I have the videos on autoplay however I cannot seem to get the play only on viewport working.
I have implemented my video player using the HTML element. I’ve tried leveraging the JavaScript Intersection Observer API to implement the play on viewport with no success.
You can see here for reference:
I’m reaching out to the Bubble community to see if you guys have an ideas on how to achieve this functionality. I’m hoping to get this working with vanilla JavaScript because I think its possible to achieve. Any feedback will be very helpful!
I’ve also pasted in the link to what the project currently looks like: