Re: [screen-orientation] screen orientation angle

On Tue, Dec 3, 2013 at 4:10 AM, Mounir Lamouri <mounir@lamouri.fr> wrote:
> On Tue, Dec 3, 2013, at 16:13, Jonas Sicking wrote:
>> So I could see apps wanting to lock to that orientation (like you
>> pointed out, we found at least one example in Firefox OS).
>>
>> However I don't understand the use case of locking to 90/180/270
>> degrees off of the "normal" orientation?
>>
>> Simply adding a "default" (or "hardware" or "normal") orientation seem
>> to keep the API more consistent.
>>
>> I'd also be worried about introducing the same issues as
>> window.orientation has. I.e. that people would come to expect that
>> lockOrientation(90) would mean "lock to landscape".
>
> I had in mind advanced use cases where an application might want to
> rotate the screen. You can imagine four persons playing a game around a
> tablet: the UI could switch when turn switches. I admit that it might be
> a bit of a small UC but there is simply no way to make that kind of
> things possible if we don't give angle relationship between
> orientations.

Such a game could lock the screen into the four different positions
and ask "who sits here".

If we don't want to force such a UI on the developer I'd rather expose
metadata which explains the relationship between "landscape-primary"
and "portrait-primary". We could there also expose which orientation
is the "normal"/"default"/"hardware" one.

> I agree that developers might end up doing lockOrientation(90) instead
> of lockOrientation('landscape') but I am not sure if that risk is worth
> killing a UC.

Given how extraordinary common that is today, I worry about this risk a lot.

/ Jonas

Received on Tuesday, 3 December 2013 18:02:16 UTC