XRInputSource.profiles - Web APIs 编辑

Secure context

This 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 strings 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

SpecificationStatusComment
WebXR Device API
The definition of 'XRInputSource.profiles' in that specification.
Working DraftInitial definition.

Browser compatibility

BCD tables only load in the browser

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.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:71 次

字数:3881

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文