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 specifiedXRSession
.
Instance methods
XRMediaBinding.createCylinderLayer()
Experimental-
Returns an
XRCylinderLayer
object bound to anHTMLVideoElement
. XRMediaBinding.createEquirectLayer()
Experimental-
Returns an
XREquirectLayer
object bound to anHTMLVideoElement
. XRMediaBinding.createQuadLayer()
Experimental-
Returns an
XRQuadLayer
object bound to anHTMLVideoElement
.
Specifications
Specification |
---|
WebXR Layers API Level 1 # XRWebGLBindingtype |
Browser compatibility
BCD tables only load in the browser