B
B
barkalov2012-11-10 11:03:44
HTML
barkalov, 2012-11-10 11:03:44

Fullscreen for iframe applications Vkontakte?

Is there a full screen mode for non-flash iframe applications?
Maybe there is at least some flash wrapper or other workarounds?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
karavwai, 2012-11-10
@barkalov

Flash is not needed.
Enabling fullscreen:

var doc = document.body;
if(doc.requestFullscreen){
  doc.requestFullscreen();
}
else if(doc.mozRequestFullScreen){
  doc.mozRequestFullScreen();
}
else if(doc.webkitRequestFullScreen){
  doc.webkitRequestFullScreen();
}

Fullscreen Exit:
if(document.exitFullscreen){
  document.exitFullscreen();
}
else if(document.mozCancelFullScreen){
  document.mozCancelFullScreen();
}
else if(document.webkitCancelFullScreen){
  document.webkitCancelFullScreen();
}

Works on latest versions of Chrome, Firefox, Safari, Opera. The rest did not check.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question