Skip to content

Type Alias: MOQtailClientOptions ​

MOQtailClientOptions = object

Options for the MOQtailClient constructor: connection target, protocol negotiation, and timeouts. Nothing happens on the network until MOQtailClient.init.

Example ​

ts
const client = new MOQtailClient({
  url: relayUrl,
  dataStreamTimeoutMs: 5000,
  controlStreamTimeoutMs: 1500,
})
client.on('sessionterminated', (r) => console.warn('terminated', r))
await client.init()

Properties ​

controlStreamTimeoutMs? ​

optional controlStreamTimeoutMs?: number

Control stream read timeout in milliseconds.


dataStreamTimeoutMs? ​

optional dataStreamTimeoutMs?: number

Per data uni-stream idle timeout in milliseconds.


enableDatagrams? ​

optional enableDatagrams?: boolean

If true, enables datagram support for the session.


fillOpenTimeoutMs? ​

optional fillOpenTimeoutMs?: number

How long after SUBSCRIBE_OK a fill fetch stream may take to open before ordering stops waiting for it, in milliseconds. Defaults to DEFAULT_FILL_OPEN_TIMEOUT_MS.

A fill that opens later still orders against what is held, but its objects at or before what was already released come late (flush) or are dropped (drop), and no orderinggap reports them. Raise it on paths whose RTT nears it.


ordering? ​

optional ordering?: ObjectOrdering | "none"

The default ObjectOrdering of the session's subscriptions and fetches. Without one, objects pass through unordered.


setupOptions? ​

optional setupOptions?: SetupOptions

SetupOptions customizations; if omitted a default instance is built.


switchDrainTimeoutMs? ​

optional switchDrainTimeoutMs?: number

How long a track a soft switch handed over from may stay quiet before it is retired anyway, in milliseconds. Defaults to DEFAULT_SWITCH_DRAIN_TIMEOUT_MS.


trackAliasResolutionTimeoutMs? ​

optional trackAliasResolutionTimeoutMs?: number

How long a data stream waits for the control message that establishes its track alias before the stream is abandoned, in milliseconds. Defaults to DEFAULT_TRACK_ALIAS_RESOLUTION_TIMEOUT_MS.


transportOptions? ​

optional transportOptions?: WebTransportOptions & object

Passed directly to the browser's WebTransport constructor for WebTransportOptions.

Type Declaration ​

protocols? ​

optional protocols?: string[]


url ​

url: string | URL

Relay / server endpoint for the underlying WebTransport session (can be absolute URL or string).