XRSessionInit - Web APIs 编辑
Draft
This page is not complete.
The WebXR Device API dictionary XRSessionInit
specifies required and/or optional features when requesting a new XRSession
by calling the navigator.xr.requestSession()
method.
Properties
The following parameters are all optional. If none are included, the device will use a default feature configuration for all options.
optionalFeatures
Optional- An array of values identifying features which the returned
XRSession
may optionally support. At this time, all features are identified using strings from theXRReferenceSpaceType
enumeration, but future updates to the WebXR standard may add more features. requiredFeatures
Optional- An array of values which the returned
XRSession
must support. These values currently must come from the enumerated typeXRReferenceSpaceType
. More features may be added in future updates to the WebXR standard.
Default features
Immersive sessions
All immersive (both immersive-vr
and immersive-ar
) sessions support both the viewer
and local
reference spaces.
Because immersive sessions are required to support the local
reference space, any request to open an immersive XRSession
is required to obtain explicit or implicit user consent.
Inline sessions
All inline
WebXR sessions support the viewer
reference space.
Security requirements
Each reference space or feature type has minimum safety requirements. By session type, those are:
Reference space type | User consent rquirement | Feature policy requirement |
---|---|---|
bounded-floor | Always required | xr-spatial-tracking |
local | Always required for inline sessions | xr-spatial-tracking |
local-floor | Always required | xr-spatial-tracking |
unbounded | Always required | xr-spatial-tracking |
viewer | Always required | — |
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论