Skip to content

WantOptions

Defined in: relay-sdks/ts/src/supervised-subscriber.ts:72

What a want asks for.

drainMs?: number;

Defined in: relay-sdks/ts/src/supervised-subscriber.ts:107

How long the old subscription keeps delivering its in-flight groups after a cutover, in milliseconds, as on switchTo: 0 (the default) to 2147483647.


generations?: boolean;

Defined in: relay-sdks/ts/src/supervised-subscriber.ts:87

Follow a supervised publisher: discover the namespaces one field below namespace and keep the subscription on the newest generation announced there, moving when a newer one is announced or the current one is withdrawn. The subscriber’s token must allow discovering the root.


namespace: readonly string[];

Defined in: relay-sdks/ts/src/supervised-subscriber.ts:77

The track’s namespace. With generations, a supervised publisher’s root instead: the want follows the newest generation announced under it.


parameters?: MessageParameters;

Defined in: relay-sdks/ts/src/supervised-subscriber.ts:81

Message parameters sent on every SUBSCRIBE, such as a location filter or a delivery timeout.


retry?: SupervisionBackoff;

Defined in: relay-sdks/ts/src/supervised-subscriber.ts:95

Backoff between resubscriptions. Default from 250 ms, doubling up to 8 s, with jitter.


staleAfterMs?: number;

Defined in: relay-sdks/ts/src/supervised-subscriber.ts:93

Resubscribe when no object arrived for this long, from acceptance or the last object. Only for tracks that are never silent while live: a muted microphone or a camera that is off is silent on purpose. After a publisher crash moq-relay can keep an accepted subscription on the dead publisher’s cached object for about 11 s.


track: string;

Defined in: relay-sdks/ts/src/supervised-subscriber.ts:79

Track name within the namespace.


until?: "first-object" | ((object) => boolean);

Defined in: relay-sdks/ts/src/supervised-subscriber.ts:102

When a move cuts over to its replacement subscription, as on switchTo: 'first-object' (the default) or a synchronous predicate on the replacement’s objects. A move is a newer generation, or a re-want with another track or parameters; the current subscription keeps delivering until then. Compare the object’s own timeline with what was delivered, never group IDs: each generation and track numbers its own groups.