[whatwg] Full screen for the <video> element

On Thu, 22 Mar 2007 11:11:10 +0100, Gervase Markham <gerv at mozilla.org>  
wrote:

> Simon Pieters wrote:
>> Browsers are allowed to provide full screen, however there's no API for  
>> it. Entering fullscreen should only be under the control of the user,  
>> otherwise the author could hijack the user's screen and no way to get  
>> out of it (e.g. as soon as the user tries to exit fullscreen, the  
>> script goes back to fullscreen).
>
> Indeed. But it would be good to have an event which triggers when the  
> user chooses to go full screen, so the page can e.g. hide headers and  
> borders. (Or perhaps the onresize() event on the body already does  
> that?).

You can sort of hack your way to that using

   if (window.innerWidth == screen.width)
   {
     // selectively hide elements
   }

... but the solution isn't ideal. Making browsers support CSS  
media="projection" is, IMHO, a better long-term solution.
-- 
Arve Bersvendsen, Web Applications Developer

Opera Software ASA, http://www.opera.com/

Received on Thursday, 22 March 2007 06:16:28 UTC