LauraS Posted October 10, 2024 Posted October 10, 2024 I want to create an array of videos, then as each one comes into view, play it, but my code doesn't seem to be working. I think I'm either cycling through the array improperly or calling the play function improperly. Can anyone help please? See the Pen poMNZLr by lschneiderman (@lschneiderman) on CodePen.
Solution mvaneijgen Posted October 11, 2024 Solution Posted October 11, 2024 You don't want to autoplay other than that it seems to work fine! See the Pen vYogYyP?editors=1010 by mvaneijgen (@mvaneijgen) on CodePen.
LauraS Posted October 11, 2024 Author Posted October 11, 2024 @mvaneijgen Thank you! I have to include "autoplay", though, or else Safari on mobile will not play the videos with ScrollTrigger. Safari sucks. 1
mvaneijgen Posted October 11, 2024 Posted October 11, 2024 Maybe you can then can include autoplay, but then .pause() them with javascript and then .play() might still work?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now