W3cubDocs

/Web APIs

XRMediaBinding

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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
XRMediaBinding No No No No No No No No No No No No
XRMediaBinding No No No No No No No No No No No No
createCylinderLayer No No No No No No No No No No No No
createEquirectLayer No No No No No No No No No No No No
createQuadLayer No No No No No No No No No No No No

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/XRMediaBinding