WebXR Device API
The XRMediaBinding interface is used to create layers that display the content of an HTMLVideoElement.
[!NOTE] Only the video frames will be displayed in the layer. Video controls need to be implemented separately and must be drawn in another layer.
Constructor
- XRMediaBinding.XRMediaBinding
- : Creates a new
XRMediaBindingobject for the specified XRSession.
- : Creates a new
Instance methods
- XRMediaBinding.createCylinderLayer()
- : Returns an XRCylinderLayer object bound to an HTMLVideoElement.
- XRMediaBinding.createEquirectLayer()
- : Returns an XREquirectLayer object bound to an HTMLVideoElement.
- XRMediaBinding.createQuadLayer()
- : Returns an XRQuadLayer object bound to an HTMLVideoElement.
Specifications
Browser compatibility
See also
- HTMLVideoElement
- XRCylinderLayer, XREquirectLayer, XRQuadLayer
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
