Optionalcallbackscallbacks for observability and logging purposes:
OptionalonMessageReceived?: (msg: ControlMessage) => voidCalled for each incoming control message before protocol handling.
OptionalonMessageSent?: (msg: ControlMessage) => voidCalled after a control message is successfully written to the ControlStream.
OptionalonSessionTerminated?: (reason?: unknown) => voidFired once when the session ends (normal or error). Receives the reason passed to disconnect.
OptionalcontrolControl stream read timeout in milliseconds.
OptionaldataPer data uni-stream idle timeout in milliseconds.
OptionalsetupSetupParameters customizations; if omitted a default instance is built.
Ordered preference list of MOQT protocol version numbers (e.g. 0xff00000b).
OptionaltransportPassed 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