XRMediaBinding

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

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

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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() Experimental

Creates a new XRMediaBinding object for the specified XRSession.

Instance methods

XRMediaBinding.createCylinderLayer() Experimental

Returns an XRCylinderLayer object bound to an HTMLVideoElement.

XRMediaBinding.createEquirectLayer() Experimental

Returns an XREquirectLayer object bound to an HTMLVideoElement.

XRMediaBinding.createQuadLayer() Experimental

Returns an XRQuadLayer object bound to an HTMLVideoElement.

Specifications

Specification
WebXR Layers API Level 1
# XRWebGLBindingtype

Browser compatibility

BCD tables only load in the browser

See also