I\'ve made a popup and placed a youtube video in it. I set video to autoplay. But the problem is video plays when i open the page. It is auto play in global and i want it to aut
I think you want something like that :
LIVE EXAMPLE
Basically i use the API Javascript to add actions play
and pause
to the video.
And i use default function of Foundation to add an event when to the player.
HTML
Click Me For A Modal
Awesome
×
JS
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// 3. This function creates an