Optional
callbackscallbacks for observability and logging purposes:
Optional
onMessageReceived?: (msg: ControlMessage) => voidCalled for each incoming control message before protocol handling.
Optional
onMessageSent?: (msg: ControlMessage) => voidCalled after a control message is successfully written to the ControlStream.
Optional
onSessionTerminated?: (reason?: unknown) => voidFired once when the session ends (normal or error). Receives the reason passed to disconnect.
Optional
controlControl stream read timeout in milliseconds.
Optional
dataPer data uni-stream idle timeout in milliseconds.
Optional
setupSetupParameters customizations; if omitted a default instance is built.
Ordered preference list of MOQT protocol version numbers (e.g. 0xff00000b
).
Optional
transportPassed directly to the browser's WebTransport constructor for WebTransportOptions.
Relay / server endpoint for the underlying WebTransport session (can be absolute URL or string).
Options for MOQtailClient.new controlling connection target, protocol negotiation, timeouts, and lifecycle callbacks.
Example: Minimal
Example: With callbacks & timeouts