views:

264

answers:

2

hi i have a website which has a video playing.

what i want is when my browser going into a full screen mode i want to only show my video.

when i press F11 by click on the address bar / click on the browser window and press F11 my browser goes into the full screenmode.But i dont understand that F11 is played.

Is there a event from my browser to Html code that i can use to understand that my browser has gone into fullscreen mode ?

Thanks

Sohil

+1  A: 

How about this?

function displayUnicodeKeyValue(e){
     var unicode = e.keyCode ? e.keyCode : e.charCode;
     alert(unicode);

     if(unicode === 112) {
          //Yay, F11 was pressed, put code here to handle it.
               }
          }


Mr. Smith
A: 

Take a look at this

http://developer.yahoo.com/yui/examples/container/keylistener.html

Easy to use key listener that will not only capture the key event, but stop it from propogating up to the browser. I have gotten this to work with CRTL+O.

Zoidberg