SubscriptionHandlers
Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:80
Callbacks for MoqtSession.subscribe. Each must be synchronous; an async function throws TypeError.
Methods
Section titled “Methods”onDone()?
Section titled “onDone()?”onDone?(done): void;Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:102
PUBLISH_DONE arrived. Subgroup streams already in flight still deliver until the subscription is cancelled.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
done |
PublishDone |
Returns
Section titled “Returns”void
onError()?
Section titled “onError()?”onError?(error): void;Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:84
The subscription failed before or instead of SUBSCRIBE_OK: REQUEST_ERROR, or a stream failure.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
error |
RequestError |
Returns
Section titled “Returns”void
onGoaway()?
Section titled “onGoaway()?”onGoaway?(goaway): void;Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:111
GOAWAY on this request stream: re-issue the request (possibly elsewhere).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
goaway |
Goaway |
Returns
Section titled “Returns”void
onObject()?
Section titled “onObject()?”onObject?(object): void;Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:86
An object arrived on one of the subscription’s subgroup streams.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
object |
MoqtObject |
Returns
Section titled “Returns”void
onOk()?
Section titled “onOk()?”onOk?(ok): void;Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:82
SUBSCRIBE_OK arrived.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ok |
SubscribeOk |
Returns
Section titled “Returns”void
onStateNotify()?
Section titled “onStateNotify()?”onStateNotify?(parameters): void;Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:109
PUBLISH_STATE_NOTIFY (§9.10): the publisher changed subscription state on its own — parameters carries only what
changed, with LARGEST_OBJECT marking where. Informational; the session sends no reply.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
parameters |
MessageParameters |
Returns
Section titled “Returns”void
onSubgroupEnd()?
Section titled “onSubgroupEnd()?”onSubgroupEnd?(info): void;Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:88
A subgroup stream finished cleanly (FIN).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
info |
{ endOfGroup: boolean; groupId: number; subgroupId: number; } |
info.endOfGroup |
boolean |
info.groupId |
number |
info.subgroupId |
number |
Returns
Section titled “Returns”void
onSubgroupReset()?
Section titled “onSubgroupReset()?”onSubgroupReset?(info): void;Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:97
A subgroup stream was reset — objects from it may be missing. Reported for every reset the session receives; a relay that drops a reset instead of forwarding it leaves nothing to report.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
info |
{ error: unknown; groupId: number; } |
info.error |
unknown |
info.groupId |
number |
Returns
Section titled “Returns”void
onUpdateOk()?
Section titled “onUpdateOk()?”onUpdateOk?(): void;Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:104
Response to a REQUEST_UPDATE sent on this subscription.
Returns
Section titled “Returns”void