I've got a page with a embedded Youtube video in a iframe.
I want to set the video to full screen whenever someone plays the video.
I've tried many things but can't seem to get it working.
My code:
<div class="video-wrapper">
<div class="video">
<iframe id="home-video" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen"
msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen"
webkitallowfullscreen="webkitallowfullscreen" frameborder="0"
src="https://www.youtube.com/watch_popup?v=dQw4w9WgXcQ">
</iframe>
</div>
</div>
I also tried to accomplish this with the Youtube Api, but without success.
<script src="https://www.youtube.com/iframe_api"></script>
Anyone?
Best Answer
I would try the fullScreen API for HTML5: