Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Stop YouTube video playing when overlay is closed Reply To: Stop YouTube video playing when overlay is closed

#263906
bclovis
Participant

Yes sorry, lucky for me for the most part I haven’t had to deal with youtube videos in a while, but here is a quick one using the API:

https://codepen.io/bwclovis/pen/WdbWwd

The idea is to have the video ID in the button that gets dynamically loaded when the button is clicked, so you can have multiple buttons with the multiple IDs. There would have to be an each loop there but, this should get you in the right direction.