Is there a way to play a video fullscreen using the HTML5 <video>
tag?
And if this is not possible, does anybody know if there is a reason for this decision?
Is there a way to play a video fullscreen using the HTML5 <video>
tag?
And if this is not possible, does anybody know if there is a reason for this decision?
HTML 5 provides no way to make a video fullscreen, but the parallel Fullscreen specification supplies the
requestFullScreen
method which allows arbitrary elements (including<video>
elements) to be made fullscreen.It has experimental support in a number of browsers.
Original answer:
From the HTML5 spec (at the time of writing: June '09):
Browsers may provide a user interface, but shouldn't provide a programmable one.
Note that the above warning has since been removed from the specification.
No, it is not possible to have fullscreen video in html 5. If you want to know reasons, you're lucky because the argument battle for fullscreen is fought right now. See WHATWG mailing list and look for the word "video". I personally hope that they provide fullscreen API in HTML 5.
Safari supports it through
webkitEnterFullscreen
.Chrome should support it since it's WebKit also, but errors out.
Chris Blizzard of Firefox said they're coming out with their own version of fullscreen which will allow any element to go to fullscreen. e.g. Canvas
Philip Jagenstedt of Opera says they'll support it in a later release.
Yes, the HTML5 video spec says not to support fullscreen, but since users want it, and every browser is going to support it, the spec will change.
If none of these answers dont work (as they didnt for me) you can set up two videos. One for regular size and another for fullscreen size. When you want to switch to fullscreen
Firefox 3.6 has a full screen option for HTML5 video's, right-click on the video and select 'full screen'.
The latest Webkit nightlies also support full screen HTML5 video, try the Sublime player with the latest nightly and hold Cmd / Ctrl while selecting the full screen option.
I guess Chrome / Opera will also support something like this. Hopefully IE9 will also support full screen HTML5 video.
The complete solution: