Web/API/XRInputSource/profiles

From Get docs

Secure contextThis feature is available only in secure contexts (HTTPS), in some or all supporting browsers.


The read-only XRInputSource property profiles returns an array of strings, each describing a configuration profile for the input source. The profile stings are listed in order of specificity, with the most specific profile listed first.

Note: The profiles list is always empty when the WebXR session is in inline mode.


Syntax

let profileList = xrInputSource.profiles;

Value

An array of DOMString objects, each describing one configuration profile for the input device represented by the XRInputSource object. Each input profile specifies the preferred visual representation and behavior of the input source.

Usage notes

Input profile names

An input profile name is a string describing a visual representation and behavior the input source may be configured to use. Each string:

  • Has no spaces; instead, words are separated by hyphen ("-") characters
  • If the platform makes it available, the USB vendor and product ID may be provided but cannot be relied upon
  • Does not uniquely identify a specific device; rather, it identifies a configuration that the product is capable of using
  • Does not provide information about handedness of the device, if applicable

The WebXR Input Profiles Registry is used by device developers and browser developers to attempt to ensure that a given device will report the same profile strings regardless of which browser or other user agent you use.

Specifications

Specification Status Comment
WebXR Device APIThe definition of 'XRInputSource.profiles' in that specification. Working Draft Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
profiles Chrome

Full support 79

Edge

Full support 79

Firefox

No support No

IE

No support No

Opera

No support No

Safari

No support No

WebView Android

No support No

Chrome Android

Full support 79

Firefox Android

No support No

Opera Android

No support No

Safari iOS

No support No

Samsung Internet Android

Full support 11.2

Legend

Full support  
Full support
No support  
No support


See also