THREE.JS / FOUNDATIONS 166

Let the video own the layer.

A generated Canvas captureStream feeds an HTMLVideoElement and VideoTexture. The immersive-only lane then maps that same video into the XRMediaBinding equirect layer described by the official example.

Preparing media source -

Building a deterministic local video source before probing XR-only capabilities.

session
null
media layer
session-only
destination
desktop mirror
source frames
0
video frames
0
video size
waiting
texture
initializing
draw calls
0
desktop media mirrorinitializing

The 3D plane is a desktop mirror; it is not an XR media layer.

source and layer contractdesktop path active
sourceCanvas captureStream(30)
video elementHTMLVideoElement
Three.js textureVideoTexture / sRGB
native operationXRMediaBinding.createEquirectLayer(video)
native layernot created

The generated source is mono. The stereo option is retained as a contract probe because the official example uses a stereo-left-right video for its equirectangular layer.

immersive session gatemounting

XR media layers are created only after a real session exposes the layers feature, a ready video, and XRMediaBinding.

session-only diagnosticsboundary
navigator.xrchecking
immersive VRchecking
XRMediaBindingsession-only
XR framesession-only
enabled features-

Outside XR, no binding, frame, or native media layer is inferred. The desktop VideoTexture mirror remains the active evidence path.

Drag to orbit the desktop mirror. “Force source frame” is useful in hold mode. XR media-layer creation and headset frame timing remain session-only evidence.

Review the raw upload contract Continue to the broader XR study

LAB 166 / XR MEDIA LAYER CONTRACT