Html5 Full screen video

The Solution to Html5 Full screen video is

No, there is no way to do this yet. I wish they add a future like this in browsers.


Now there is a Full Screen API for the web You can requestFullscreen on an Video or Canvas element to ask user to give you permisions and make it full screen.

Let's consider this element:

<video controls id="myvideo">
  <source src="somevideo.webm"></source>
  <source src="somevideo.mp4"></source>

We can put that video into fullscreen mode with script like this:

var elem = document.getElementById("myvideo");
if (elem.requestFullscreen) {
} else if (elem.mozRequestFullScreen) {
} else if (elem.webkitRequestFullscreen) {
} else if (elem.msRequestFullscreen) { 

Full documentation

~ Answered on 2011-05-18 04:38:35

Most Viewed Questions: