The YouTube video is supposed to play automatically when you press the blue “play” button. It was working, but seemed to stop overnight. Not sure where it’s gone wrong.
See: The Amazon Adventure - Episode 1 | Watch | Fantail Studios
<script>
$('.button-large-1').on('click', function(ev) {
$(".embedly-embed")[0].src += "&autoplay=1";
ev.preventDefault();
});
$('.button-close-1').on('click', function(ev) {
var videoURL = $('.embedly-embed').prop('src');
videoURL = videoURL.replace("&autoplay=1", "");
$('.embedly-embed').prop('src','');
$('.embedly-embed').prop('src',videoURL);
});
</script>
Any help you can provide would be greatly appreciated, though I ask that if the JQuery needs updating, can you please provide the full corrected code so I can follow. Thank you.