Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Definition of default orientation #150

Closed
Johanna-hub opened this issue Feb 7, 2019 · 6 comments
Closed

Definition of default orientation #150

Johanna-hub opened this issue Feb 7, 2019 · 6 comments

Comments

@Johanna-hub
Copy link
Contributor

Currently default orientation is defined with the following:

        A <a>document</a>'s <dfn>default orientation</dfn> is the set of
          orientations to which the screen orientation is locked when it is not
          explicitly locked by this API or any other means.

It would be great to get some clarification on why default orientation is a set? From looking at the android docs it looks like the system decides on one orientation if none is specified.

@mounirlamouri Could you please explain this further?

Relates to #104

@mounirlamouri
Copy link
Member

The default orientation is indeed system-specific. For example, on most Android phones, the default orientation is landscape + portrait-primary (IIRC) but it can be changed to be portrait-primary only. We could expose this information in the API but at the time we didn't want to. FWIW, Chrome's media controls use this information (if portrait-primary only) so it may make sense to expose this to the Web so websites can also implement logic that are based on the default orientation.

@Johanna-hub
Copy link
Contributor Author

I think this could make sense because at the moment the definition is a bit vague, but exposing the information would make it very useful.

@marcoscaceres What do you think?

@marcoscaceres
Copy link
Member

If we can get the defaults from the OS, and assuming they don't change, it could be good to expose them. However, exposing these does add to device fingerprinting ... as the array's values will be device specific (though not particularly varied from one device to another).

@mounirlamouri, how do you use the defaults in the media controls? (looking for the use case, basically).

@marcoscaceres
Copy link
Member

Rethinking this, the "set" should go away, as unlocking just leaves it to the UA/OS to handle the orientations (whatever those may be).

@marcoscaceres
Copy link
Member

The orientations really represent the orientations to which a user can then change by rotating the device. So, landscape really means that the user can change the orientation to either landscape primary and landscape secondary, but not any portrait orientation.

I'm going to redefine things in those terms.

@marcoscaceres
Copy link
Member

Respecified in latest draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants