AbsoluteOrientationSensor()

The AbsoluteOrientationSensor() constructor creates a new AbsoluteOrientationSensor object which describes the device's physical orientation in relation to the Earth's reference coordinate system. If a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server. This is not something that would ever be shown to a user. The Feature-Policy HTTP header article contains implementation instructions.

Syntax
new AbsoluteOrientationSensor()
new AbsoluteOrientationSensor(options)

Parameters
 
options Optional
  Options are as follows:  
frequency: The desired number of times per second a sample should be taken, meaning the number of times per second that the reading event will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends on the device hardware and consequently may be less than requested. 
referenceFrame: Either 'device' or 'screen'. The default is 'device'.   
Specifications

Specification
Orientation Sensor # dom-absoluteorientationsensor-absoluteorientationsensor

Browser compatibility




Desktop
Mobile



Chrome
Edge
Firefox
Internet Explorer
Opera
Safari
WebView Android
Chrome Android
Firefox for Android
Opera Android
Safari on IOS
Samsung Internet



AbsoluteOrientationSensor
67
79
No
No
54
No
67
67
No
48
No
9.0


See also
 
reading event 


Found a problem with this page?

Edit on GitHub
Source on GitHub
Report a problem with this content on GitHub
Want to fix the problem yourself? See our Contribution guide.


Last modified: Feb 2, 2022, by MDN contributors


    
{'path': 'public/docs/dom/absoluteorientationsensor/absoluteorientationsensor.html', 'source': 'DevDocs.IO'}