Let plugins use device motion (tilt and turn the phone)
Plugin views can't read a phone or tablet's motion sensors, so a plugin can't respond when the device is tilted or turned. Browsers only deliver device orientation and motion events to an embedded frame that has been granted the accelerometer and gyroscope. The plugin frame isn't granted them, so these events are blocked with a permissions-policy error.
This would make plugins much better on mobile: 3D scenes and games where turning the phone looks around, spirit levels and other measuring tools, and anything that reacts to shaking or tilting.
Suggested approach: grant `accelerometer` and `gyroscope` to the plugin frame, either for every plugin or only for plugins that declare it in their manifest (for example a `sensors.motion` permission), so a user can see which plugins read device motion. On iOS the plugin would still need to ask for motion permission from a tap, which the plugin SDK could wrap.
Log in to comment and vote
No comments yet
Be the first to share your thoughts.