XRPermissionStatus.granted
The WebXR Device API's XRPermissionStatus
interface's granted
property is an array of strings, each identifying one of the WebXR features for which permission has been granted as of the time at which the Permission API's navigator.permissions.query()
method was called.
Value
An array of strings, each identifying a single WebXR feature which the app or site has been granted permission to use. Possible values:
anchor
-
Use of
XRAnchor
objects has been enabled. bounded-floor
-
A tracking space similar to the
local
type, except the user is not expected to move outside a predetermined boundary, given by theboundsGeometry
in the returned object, has been enabled. depth-sensing
-
The ability to obtain depth information using
XRDepthInformation
objects has been enabled. dom-overlay
-
Allowing to specify a DOM overlay element that will be displayed to the user has been enabled.
hand-tracking
-
Articulated hand pose information from hand-based input controllers (see
XRHand
andXRInputSource.hand
) has been enabled. hit-test
-
Hit testing features for performing hit tests against real world geometry has been enabled.
layers
-
The ability to create various layer types (other than
XRProjectionLayer
) has been enabled. light-estimation
-
The ability to estimate environmental lighting conditions using
XRLightEstimate
objects has been enabled. local
-
A tracking space whose native origin is located near the viewer's position at the time the session was created has been enabled.
local-floor
-
A tracking space similar to the
local
type, except the starting position is placed in a safe location for the viewer to stand, where the value of the y axis is 0 at floor level, has been enabled. secondary-views
-
The ability to use
XRView
objects as secondary views has been enabled. This can be used for first-person observer views used for video capture, or "quad views" where there are two views per eye, with differing resolution and fields of view. unbounded
-
A tracking space which allows the user total freedom of movement, possibly over extremely long distances from their origin point, has been enabled.
viewer
-
A tracking space whose native origin tracks the viewer's position and orientation has been enabled.
Specifications
Specification |
---|
WebXR Device API # dom-xrpermissionstatus-granted |
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 | |
granted |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
See also
- Permissions and security for WebXR
XRPermissionStatus
-
navigator.permissions
andWorkerNavigator.permissions
Permissions
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/XRPermissionStatus/granted