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

No way to force a certain orientation angle #42724

Open
rakuco opened this issue Oct 24, 2023 · 0 comments
Open

No way to force a certain orientation angle #42724

rakuco opened this issue Oct 24, 2023 · 0 comments

Comments

@rakuco
Copy link
Member

rakuco commented Oct 24, 2023

Motion sensor APIs like Accelerometer and Gyroscope support different coordinate systems as described in https://w3c.github.io/accelerometer/#reference-frame

Testing this in WPT requires a programmatic way to change the value reported by screen.orientation.angle, as the sensor readings only differ between the two coordinate systems if the angle is not 0.

At the moment, the best we can do is attempt to call screen.orientation.lock() with different values and at the end check if the angle's changed to a value we want, which probably won't work in most platforms we test regularly.

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

No branches or pull requests

1 participant