Jump to content
Search Community

How to play each video in an array as each one comes into view

LauraS
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

Posted

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.

Posted

@mvaneijgen Thank you! I have to include "autoplay", though, or else Safari on mobile will not play the videos with ScrollTrigger. Safari sucks.

  • Like 1
Posted

Maybe you can then can include autoplay, but then .pause() them with javascript and then .play() might still work? 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...