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.
XRMediaBinding() Experimental
Creates a new XRMediaBinding object for the specified XRSession.
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.
| Specification |
|---|
| WebXR Layers API Level 1> # XRWebGLBindingtype> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
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 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/XRMediaBinding