Intent to Implement: Screen Orientation API

419 views
Skip to first unread message

Christophe Dumez

unread,
Feb 7, 2014, 11:37:12 AM2/7/14
to blink-dev, mlam...@chromium.org, Mounir Lamouri, Kenneth Rohde Christiansen

Contact emails

ch.d...@samsung.com, sl.ost...@samsung.com, mlam...@chromium.org

Spec

https://dvcs.w3.org/hg/screen-orientation/raw-file/tip/Overview.html

Summary
The Screen Orientation API's goal is to provide an interface for web applications to be able to read the screen orientation state, to be informed when this state changes and to be able to lock the screen orientation to a specific state.

Motivation

We are particularly interesting in the screen orientation locking capabilities on the API and its applications for mobile gaming.

Compatibility Risk

Low:

- The API is already supported by Firefox (Desktop and Android):

https://developer.mozilla.org/en-US/docs/Web/API/Screen.orientation
- Support was also recently added to Internet Explorer 11:
http://msdn.microsoft.com/en-us/library/ie/dn433241(v=vs.85).aspx


The spec is mostly stable but we are expecting a few changes as Mounir Lamouri (editor) is working on it. We plan on advancing the implementation together with the specification.

Ongoing technical constraints

None, but requires hardware support.

Will this feature be supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?

No. This feature is mobile oriented and we plan to support for Android only short-term, with layout testing support on desktop.

OWP launch tracking bug?

https://code.google.com/p/chromium/issues/detail?id=162827

Link to entry on the feature dashboard

Not yet. Will add a row as soon as I get edit access.

Requesting approval to ship?

No.

Kind regards,
-- 
Christophe Dumez - Samsung Telecommunications America

Mounir Lamouri

unread,
Feb 7, 2014, 11:55:36 AM2/7/14
to Christophe Dumez, blink-dev, Kenneth Rohde Christiansen
On Sat, 8 Feb 2014, at 3:37, Christophe Dumez wrote:
> *Will this feature be supported on all five Blink platforms (Windows,
> Mac, Linux, Chrome OS and Android)?*
>
> **
>
> No. This feature is mobile oriented and we plan to support for Android
> only short-term, with layout testing support on desktop.

I do not see why this feature should not work for other platforms than
Android. On desktop, we could always fail to lock (supported by the
spec), thus unlock-ing would be a no-op. Regarding the orientation, it
would be as simple as comparing the width and the height of the screen,
like CSS usually define screen orientation. This is definitely how
Gecko/Firefox behave. Do you know what IE11 is doing on desktop?

--
Mounir

PhistucK

unread,
Feb 7, 2014, 12:06:36 PM2/7/14
to Mounir Lamouri, Christophe Dumez, blink-dev, Kenneth Rohde Christiansen
Regarding Internet Explorer 11 -

The entire API is only supported in Windows 8.1 (where I assume some Windows screen orientation API was introduced) and locking only works in full screen mode.


PhistucK



To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Christophe Dumez

unread,
Feb 7, 2014, 12:09:24 PM2/7/14
to Mounir Lamouri, blink-dev, Kenneth Rohde Christiansen
Yes, we can and should definitely "fallback" nicely on desktop, this is
not what I meant.
I do not know how IE11 behaves on desktop, the feature is not
implemented on Windows 7 so I cannot test myself.

Kr,

Eugene Girard

unread,
Feb 7, 2014, 12:15:33 PM2/7/14
to Mounir Lamouri, Christophe Dumez, blink-dev, Kenneth Rohde Christiansen
There seems to be a related api in core/frame/Window.idl - is that related?


PhistucK

unread,
Feb 7, 2014, 12:17:40 PM2/7/14
to Eugene Girard, Mounir Lamouri, Christophe Dumez, blink-dev, Kenneth Rohde Christiansen
This was the nonstandard incarnation of the API, I believe.


PhistucK

Kenneth Rohde Christiansen

unread,
Feb 11, 2014, 3:13:15 PM2/11/14
to Christophe Dumez, blink-dev, mlam...@chromium.org, Mounir Lamouri
LGTM as this is already part of the roadmap for this year and I have
been discussing this extensively with John Mellor and Peter Beverloo.

I know that a few changes are planned for the spec, like returning a
Promise instead of a boolean, so we need to tackle these as they
happen. I hope things goes smoothly and that we can ship this feature
soon as it is requested by many web game developers.

Cheers
Kenneth
> To unsubscribe from this group and stop receiving emails from it, send an
> email to blink-dev+...@chromium.org.



--
Kenneth Rohde Christiansen
Web Platform Architect, Intel Corporation.
Phone +45 4294 9458 ﹆﹆﹆

Peter Beverloo

unread,
Feb 12, 2014, 12:14:30 PM2/12/14
to Kenneth Rohde Christiansen, Christophe Dumez, blink-dev, mlam...@chromium.org
Getting support for Screen Orientation Lock is great, thanks for doing this!  Since we support features such as Device Orientation on non-Android platforms as well, and having consistent feature support is a good thing, it'd be great if you (Mounir?) could have a look at the feasibility of extending this to other platforms as well.

Chris' patch is implementing this behind a flag, so it will be safe to make changes as the specification is being finished up.

Thanks,
Peter

Eric Seidel

unread,
May 9, 2014, 2:05:30 AM5/9/14
to Peter Beverloo, Kenneth Rohde Christiansen, Christophe Dumez, blink-dev, mlam...@chromium.org
Curious if there is any status update on this feature?

Mounir Lamouri

unread,
May 9, 2014, 4:51:45 AM5/9/14
to Eric Seidel, Peter Beverloo, Kenneth Rohde Christiansen, Christophe Dumez, blink-dev, mlam...@chromium.org
On Fri, 9 May 2014, at 16:05, Eric Seidel wrote:
> Curious if there is any status update on this feature?

There is some version of the API behind the experimental flag in
trunk/dev. I'm not sure what's the status in Beta. That version should
be very close to what Microsoft and Mozilla have as a prefixed API. In
the mean time we changed the specification. Those changes have not yet
been entirely reflected in our implementation. There is also some work
happening to make the orientation reading part working on all platforms
and the locking graciously failing on other platforms than Android. We
are targeting shipping for M37.

-- Mounir

Rick Byers

unread,
May 9, 2014, 9:18:51 AM5/9/14
to Mounir Lamouri, Eric Seidel, Peter Beverloo, Kenneth Rohde Christiansen, Christophe Dumez, blink-dev, mlam...@chromium.org, Robert Flack
We should plan to make this API work with full fidelity on ChromeOS when we have the hardware (eg. the new Lenovo convertible device auto-rotates, and so should support rotation lock APIs).  +flackr who owns this code.  If this API is plumbed up to the content API in an appropriate platform neutral way, I'm sure we can get it implemented fully on ChromeOS.

Rick

phili...@gmail.com

unread,
May 27, 2014, 8:24:18 AM5/27/14
to blin...@chromium.org, Mounir Lamouri, Eric Seidel, Peter Beverloo, Kenneth Rohde Christiansen, Christophe Dumez, mlam...@chromium.org, Robert Flack
Looking forward to this. Great addition for mobile web games!
Message has been deleted

lonc...@gmail.com

unread,
Aug 13, 2014, 12:19:53 PM8/13/14
to blin...@chromium.org, mlam...@chromium.org, mou...@lamouri.fr, kenneth.ch...@gmail.com


Oh, this feature is long overdue and will be greatly appreciated by us physical interface types!
Looking forward.

 
Reply all
Reply to author
Forward
0 new messages