Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Is there a way to autoplay a YouTube video when it has scrolled into viewport and pause when scrolled out?

$
0
0

I am using ACF flexible fields and I have added a field for the Youtube link in each block. When I scroll to each block, I would like the Youtube iframe to start playing automatically (so when it has reached the viewport). When I scroll out of this block I would then like it to pause, and when it's reached the next block it will play that, etc. Please could someone assist?


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>