...

View Full Version : webkit and mozilla full-screen mode



Martins
12-20-2011, 12:50 PM
I know this has only just been introduced lately, so if I use it, how can I test if a browser supports it?

If I do something like the following, I believe I am testing if the browser is in full screen mode not whether or not the browser offers the functionality?


function FullScreenSupported() {
if (document.webkitIsFullScreen) {
alert("webkitIsFullScreen is supported");/
}else{
alert("webkitIsFullScreen is not supported");
}
}

Mozilla’s introduction to full screen mode is here:
https://developer.mozilla.org/en/DOM/Using_full-screen_mode#AutoCompatibilityTable

Thanks.

chump2877
12-20-2011, 01:45 PM
Wouldn't HTML5's implementation of full screen video be a more standardized, forward-compatible approach than using webkit? For example:

http://www.html5-fullscreen-video.com/
http://www.html5-fullscreen-video.com/html_5_fullscreen/movie/2

venegal
12-20-2011, 02:01 PM
I know this has only just been introduced lately, so if I use it, how can I test if a browser supports it?


The document you linked to pretty much says it all:


if (elem.requestFullScreen) {
// Standard support
} else if (elem.mozRequestFullScreen) {
// Gecko support
} else if (elem.webkitRequestFullScreen) {
// Webkit support
}

Martins
12-21-2011, 10:27 AM
Thanks.

I resolved this as:


document.webkitIsFullScreen != null



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum