安全上下文
此特征只可用于 安全上下文 (HTTPS),在某些或所有 支持浏览器 .

只读 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.

注意: profiles list is always empty when the WebXR session is in inline mode.

句法

let profileList = xrInputSource.profiles;
					

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.

用法注意事项

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

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 用户代理 you use.

规范

规范 状态 注释
WebXR 设备 API
The definition of 'XRInputSource.profiles' in that specification.
工作草案 初始定义。

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

更新 GitHub 上的兼容性数据
桌面 移动
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 79 Edge 79 Firefox No IE No Opera No Safari No WebView Android No Chrome Android 79 Firefox Android No Opera Android No Safari iOS No Samsung Internet Android 11.2

图例

完整支持

完整支持

不支持

不支持

另请参阅

元数据

  • 最后修改: