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
const client = new MOQtailClient({
url: relayUrl,
dataStreamTimeoutMs: 5000,
controlStreamTimeoutMs: 1500,
})
client.on('sessionterminated', (r) => console.warn('terminated', r))
await client.init()Properties
controlStreamTimeoutMs?
optionalcontrolStreamTimeoutMs?:number
Control stream read timeout in milliseconds.
dataStreamTimeoutMs?
optionaldataStreamTimeoutMs?:number
Per data uni-stream idle timeout in milliseconds.
enableDatagrams?
optionalenableDatagrams?:boolean
If true, enables datagram support for the session.
fillOpenTimeoutMs?
optionalfillOpenTimeoutMs?: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?
optionalordering?:ObjectOrdering|"none"
The default ObjectOrdering of the session's subscriptions and fetches. Without one, objects pass through unordered.
setupOptions?
optionalsetupOptions?:SetupOptions
SetupOptions customizations; if omitted a default instance is built.
switchDrainTimeoutMs?
optionalswitchDrainTimeoutMs?: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?
optionaltrackAliasResolutionTimeoutMs?: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?
optionaltransportOptions?:WebTransportOptions&object
Passed directly to the browser's WebTransport constructor for WebTransportOptions.
Type Declaration
protocols?
optionalprotocols?:string[]
url
url:
string|URL
Relay / server endpoint for the underlying WebTransport session (can be absolute URL or string).