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

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
XRMediaBinding
Experimental
XRMediaBinding() constructor
Experimental
createCylinderLayer
Experimental
createEquirectLayer
Experimental
createQuadLayer
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

See also