Open juscelinobarao opened 4 years ago
The code below opens a YouTube video after 5 seconds (perfectly). But I can't make the video play automatically.
<script type="text/javascript"> setTimeout(function(){ $.magnificPopup.open({ items: { src: 'http://www.youtube.com/watch?v=VZWMLKxV9xo?autoplay=1&rel=0' }, type: 'iframe', preloader: true }); }, 5000); </script>
Where am I going wrong? Is any necessary parameter missing? What is the best way to do this?
@juscelinobarao Chrome changed their autoplay policies Muting the audio while embedding seems to work. See: https://codepen.io/navin09/pen/MWeeJjo
The code below opens a YouTube video after 5 seconds (perfectly). But I can't make the video play automatically.
Where am I going wrong? Is any necessary parameter missing? What is the best way to do this?