Skip to main content
Topic: javascript fullscreen with otter (Read 1324 times)

javascript fullscreen with otter

hi all !

a little difficulties, i made à little "slideshow" in javascript...
 i found the links in javascript to test the fullscreen'state of many browser (opera, mozilla, IE, chrome-like) but for Otter ??
and to open/close these browsers in fullscreenmode

but, for Otter, how to know if Otter is in fullscreen mode, and how to pass it in fullscreenmode (and out) with JS...

thanks a lot

Re: javascript fullscreen with otter

Reply #1
well, well, well...

here, the javascript code to pass any webrowser in fullscreen (and getout fullscreen)(fullf11 is just a fx name)

Code: [Select]
function fullf11(){ elem = document.body;
    if (    (document.fullscreenElement !== undefined && document.fullscreenElement === null)
         || (document.msFullscreenElement !== undefined && document.msFullscreenElement === null)
         || (document.mozFullScreen != undefined && !document.mozFullScreen )
         || (document.webkitIsFullScreen !== undefined && !document.webkitIsFullScreen))
        { if    (elem.requestFullscreen)       { elem.requestFullscreen();   }
        else if (elem.mozRequestFullScreen)    { elem.mozRequestFullScreen();}
        else if (elem.webkitRequestFullScreen) { elem.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);}
        else if (elem.msRequestFullscreen)     { elem.msRequestFullscreen(); }         }  }

function exitf11(){ if (document.fullscreenElement !== undefined && document.fullscreenElement === null) { fullf11();}
        else {
if (document.exitFullscreen) {document.exitFullscreen(); }
else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); }
else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); }
else if (document.msExitFullscreen) { document.msExitFullscreen(); }       }  }

if somes got the equivalent for Otter... (cause F11 do works, and it's possible to make a keyboard shortcut for it... then somebody certainly know the name of this link ;) )

Re: javascript fullscreen with otter

Reply #2
i don't have find the trick about the way to leave full screen, but i found the way to Enter full screen  :knight: (not easy)

then the problem is about leave full screen... the [document.webkitExitFullscreen] is on Iridium browser [document.webkitCancelFullScreen]

but, if first an d second return true, then exist on Otter and Iridium... only iridium do react positively to this imperius command.

then the last problem of it is just there... (be there) may it work with other Otter package...

win10pro x64, Otter32b weekly230; webkit 602.1