W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2007

[whatwg] Full screen for the <video> element

From: Arve Bersvendsen <arveb@opera.com>
Date: Thu, 22 Mar 2007 14:16:28 +0100
Message-ID: <op.tpldtq1fbyn2jm@carnage>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:53 UTC