Address of the CloudXR Runtime.
Can be an IP address (e.g., '192.168.1.100') or hostname. For local development, use 'localhost' or '127.0.0.1'.
Port of the CloudXR Runtime.
The default CloudXR Runtime port is 49100. Ensure this port is accessible and not blocked by firewalls.
Connect using secure connection (WSS/HTTPS).
When true, uses secure WebSocket (WSS) connection. When false, uses unsecured WebSocket (WS) connection. For production deployments, secure connections are recommended.
WebGL context for rendering.
Must be a WebGL2RenderingContext obtained from a canvas element. This context will be used for all CloudXR rendering operations.
Width of each eye in pixels.
This should match the per-eye resolution you want to render. Must be a multiple of 16 for optimal performance. The actual stream width will be calculated as perEyeWidth * 2.
Height of each eye in pixels.
This should match the per-eye resolution you want to render. Must be a multiple of 16 for optimal performance. The actual stream height will be calculated as perEyeHeight * 9 / 4.
XR reference space to use for coordinate system calculations.
This is used for getting the viewer pose from the XR frame and should be obtained from the WebXR session.
OptionalglXR WebGL binding used to query viewport information for each eye.
Optional binding that provides additional viewport information. If not provided, default viewport calculations will be used.
OptionalcodecVideo codec for streaming.
Supported codecs: 'h264', 'av1'. AV1 provides better compression but requires more CPU/GPU resources for encoding/decoding.
OptionaldeviceDevice frame rate (maximum FPS).
The server will treat this as a maximum FPS and choose an appropriate streaming frame rate that is lower than this value. Higher frame rates provide smoother motion but require more bandwidth.
OptionalmaxMaximum streaming bitrate in Kilobits per second.
Controls the maximum bandwidth used for streaming. Higher bitrates provide better quality but require more network bandwidth.
OptionaltelemetryTelemetry configuration options
Optionalenabled?: booleanEnable telemetry collection. Default is true.
OptionalappInfo?: { version?: string; product?: string }Application information for telemetry
Optionalversion?: stringApplication version (e.g., "1.0.0")
Optionalproduct?: stringProduct name (e.g., "MyApp")
OptionalenableEnable secondary smoothing on predicted positions.
When enabled, applies an additional smoothing pass to reduce jitter in predicted positions. This only affects position, not orientation.
OptionalposePose prediction factor (0.0 to 1.0) that scales the prediction horizon.
This multiplier is applied to the calculated prediction horizon for both position and orientation. A value of 1.0 uses full prediction, 0.5 uses half the prediction horizon, and 0.0 disables prediction entirely.
Defines configuration options for a CloudXR streaming session.
Defines all configuration parameters needed to create and configure a CloudXR streaming session. Required parameters must be provided, while optional parameters have sensible defaults.
Example