dorukeker / gyronorm.js

JavaScript project for accessing and normalizing the accelerometer and gyroscope data on mobile devices
MIT License
641 stars 65 forks source link

DeviceOrientation is DEPRECATED - Removed in Google chrome M76 #62

Open amohoric opened 5 years ago

amohoric commented 5 years ago

Greetings!

Will there be any update for the new device motion and orientation events? They will be deprecated soon. It would be a pity if the library would be rendered useless?

Kind regards, Ales Slovenia (Europe)

[Deprecation] The devicemotion event is deprecated on insecure origins and will be removed in M76, around July 2019. Event handlers can still be registered but are no longer invoked since M74, around April 2019. See https://www.chromestatus.com/feature/5688035094036480 for more details.

roboholix commented 4 years ago

It looks like the deprecation warning only applies to insecure origins (anything with an "http" instead of an "https").

Only existing code on sites being visited with an "http" protocol would break. To resolve you would need to setup a proper implementation of "https" for your domain and redirect any potential "http" requests to the new "https" version of the site.

If users are already visiting or are redirected to an "https" only version of your domain, you would not need to take any action and existing code should still work.