Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html5 Full screen video

Tags:

html

Is there any way to do this? I wan to play video in full screen. Without browser. setting width:100%; height:100%; keep browser visible yet

like image 791
Sahar Avatar asked May 18 '11 04:05

Sahar


People also ask

How do you make a video full screen?

Tap the video you'd like to watch. At the bottom of the video player, tap full screen .

How do I force HTML full screen?

Full-screen can be activated for the whole browser window by pressing the F11 key. It can be exited by pressing the Esc button.

How do I view HTML5 video?

The webmasters need to use special HTML5 coding and include WebM, MP4 and OGG formats on their web pages. Before HTML5 videos were only played using the Flash Player. You can view HTML5 videos on all popular browsers such as Google Chrome, Internet Explorer, Mozilla Firefox, and Safari.


2 Answers

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

EDIT:

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> </video> 

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

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

Full documentation

like image 186
Mohsen Avatar answered Oct 02 '22 11:10

Mohsen


From CSS

video {     position: fixed; right: 0; bottom: 0;     min-width: 100%; min-height: 100%;     width: auto; height: auto; z-index: -100;     background: url(polina.jpg) no-repeat;     background-size: cover; } 
like image 20
Montaser Avatar answered Oct 02 '22 12:10

Montaser