Assuming I have a youtube video in an iframe on my site, how would I be able to reproduce the iframe by clicking anywhere in the body of the page without doing what the iframe takes over the entire screen? For example when clicking anywhere on the page, or in some other iframe, this iframe is executed first? Thank you very much in advance! I'm setting up a puzzlee site and a certain page, as a consequence of the previous one, the user is faced with a black screen and will have to interact with just a click and waiting, for the video to begin. I've tried to do something like this:
<a id="play-video" href="#">Reproduzir video</a><br />
<iframe id="video" width="1280" height="720"
src="//www.youtube.com/embed/xrel=0" frameborder="0"
allowfullscreen></iframe>
$(document).ready(function() {
$('#play-video').on('click', function(ev) {
$("#video")[0].src += "&autoplay=1";
ev.preventDefault();
});
});
However, I can not extend the video playback function to any point on the screen.