The W3C defined a generic sensor API for browsers which also allows to support 
sensors like the Magnetometer. The spec can be found here: 
https://www.w3.org/TR/generic-sensor/

Does Mozilla intend to support that API for Firefox? Is it maybe even already 
under development?

note: Chrome 63 does support it in it early version already and it works 
nicely. As a second note as I saw some discussion around here about security 
and sensors: it does require the code to be delivered via HTTPS - otherwise you 
get security exceptions.


cheers
Stefan

If someone likes to see a code snipped how it can be used with google's 
cardboard to detect the magnetic "button", I provided something at 
https://stackoverflow.com/questions/40270350/detect-google-cardboard-magnetic-button-click-in-javascript
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to