Supported codecs
The SDK supports four video codecs:Codec negotiation
The SDK automatically negotiates the best codec:- Detects which codecs the browser supports via
RTCRtpReceiver.getCapabilities('video') - Tries the
primaryCodecyou configured (or dashboard default) - If the primary codec is unavailable or incompatible:
- Tries the
fallBackCodec
- Tries the
- If the fallback is also unavailable:
- Falls back to H264
H264 is the ultimate fallback. If both your primary and fallback codecs are unavailable, the SDK will always fall back to H264 — so every user will get a working stream regardless of browser.
- AV1 requires Unreal Engine version > 5.3. On older versions, it falls back automatically.
- Firefox does not support setting codec preferences via the
setOptionSettingOptionsAPI. The SDK handles this silently.
Resolution presets
The SDK uses predefined resolution presets:Device-specific resolution
The SDK detects the user’s device and applies the appropriate starting resolution:
Device detection uses the browser’s user agent string.
Resolution modes
Fixed Resolution Mode
Sends the exact resolution dimensions to UE. The stream always renders at the specified resolution regardless of the browser viewport size.Dynamic Resolution Mode
Adapts the resolution to match the browser viewport while respecting themaxStreamQuality ceiling. When the viewport is smaller than the max quality, the SDK sends viewport dimensions. When larger, it scales down proportionally.
In this mode, the SDK also listens for window resize events and adjusts resolution automatically (with a 200ms debounce).
Crop on Resize Mode
Similar to Dynamic Resolution Mode but preserves the aspect ratio by scaling to fit the viewport with proportional dimensions.Changing resolution at runtime
UseUIControl.handleResMax() to change the maximum resolution during a session:
"WIDTHxHEIGHT".
In Fixed Resolution Mode, this sends a r.SetRes console command to UE. In Dynamic/Crop modes, it recalculates the resolution based on the viewport.
Bitrate control
Quantization parameter (QP)
QP controls video compression quality. Lower values mean better quality but more bandwidth.Next steps
Initialization and configuration
See all configuration parameters in one place.
Input controls
Configure mouse, keyboard, touch, gamepad, and WebXR input.