Re: Charter addition proposal: screen orientation lock

Hi there,

Orientation lock is already part of the CSS Device Adaption spec as part of
the viewport meta tag, though this is only going to be optional and should
be ignored for normal web browsing due to the effect on usability (think
about navigating session history). It is thus mostly useful for fullscreen
applications and stand alone web apps.

On the other hand, I think it would be nice to have a hint to the
fullscreen api requestFullscreen where you could define a preferred
orientation (which it would then lock to), something like
requestFullscreen(HORIZONTAL). It would even be nice if the UA could tell
whether it was possible to enter horizontal fullscreen mode or not, so that
there can be some kind of fallback. Having it this way, it would be
possible to click/tap on some element and animate the transition (scale +
rotation) into the final state.

Currently with the viewport meta addition it is possible for web apps to
define their target orientation and even test via javascript (matchMedia)
whether the orientation hint was granted or not. If not, the web app can
request to enter a fullscreen mode, preferable first asking the user.

Cheers,
Kenneth


On Mon, Jan 30, 2012 at 12:22 PM, Robin Berjon <robin@berjon.com> wrote:

> Hi all!
>
> Sorry for bringing this to the group this late, but it's a topic that's
> been discussed in other places and that I believe is both useful and mature
> enough to be ready for standardisation.
>
> Some applications are designed in such a way that they only make sense in
> one device orientation. The archetypical example would be a game that only
> works in landscape mode, but there are other examples. Right now native
> apps can support this rather easily, but web apps have been stuck with
> silly hacks such as detecting that the orientation is wrong and asking the
> user to rotate. This further leads to trouble when the device itself is
> used as a controller (e.g. in racing games) as this can sometimes trigger
> an undesired orientation change mid-game — hardly a user-friendly
> experience.
>
> Note that this is not about system-level orientation lock (which would be
> fodder for another group) but application-level orientation.
>
> Options to address this have been discussed (amongst other places) here:
>
>
> http://groups.google.com/group/mozilla.dev.webapi/browse_thread/thread/f38bb05e66c01a77#
>
> There is discussion as to whether this ought to be only an API or if it
> should use a <meta> element (which would also give it an API since it could
> be changed dynamically), with an overall leaning towards the latter. I am
> rather confident that we should be able to agree on the best approach
> relatively quickly.
>
> I will let implementers speak for themselves, but my understanding is that
> there is interest in this feature. It is certainly a regular request from
> developers.
>
> In previous discussions we haven't hashed out who would stand up as editor
> and test facilitator, but I'm confident that we can find people. If no one
> else steps up, I'll take the testing hat.
>
> WDYT?
>
> --
> Robin Berjon - http://berjon.com/ - @robinberjon
>
>
>


-- 
Kenneth Rohde Christiansen
Senior Engineer
Nokia Mobile Phones, Browser / WebKit team
Phone  +45 4093 0598 / E-mail kenneth at webkit. <http://gmail.com>org

http://codeposts.blogspot.com ﹆﹆﹆

Received on Monday, 30 January 2012 11:44:20 UTC