Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Facebooks new fullscreen photo viewer work?

We're used to using websites like youtube in full screen, but now Facebook offers this for its image gallery. What is Facebook doing to allow full screen image browsing, that seems to use normal hmtl coding?

like image 399
Zoltan Avatar asked Mar 22 '12 19:03

Zoltan


1 Answers

That is the non-standard Fullscreen API.

In theory (from an article linked from the page I linked to above):

var elem = document.getElementById("myId");  
if (elem.requestFullScreen) {  
  elem.requestFullScreen();  
} else if (elem.mozRequestFullScreen) {  
  elem.mozRequestFullScreen();  
} else if (elem.webkitRequestFullScreen) {  
  elem.webkitRequestFullScreen();  
}  
like image 195
Quentin Avatar answered Sep 20 '22 01:09

Quentin