FrameReader
Defined in: relay-sdks/ts/src/frame-reader.ts:52
A subscription’s or a want’s handlers that read its track as frames in decode order. Pass it, or spread it with
handlers of your own, to subscribe or want. Each group is one subgroup, as the frame writer sends it, so a
subgroup’s end is its group’s. A want read through a reader keeps drainMs at 0, the default: a drained old
subscription’s groups would arrive after the Move, indistinguishable from the new one’s.
Methods
Section titled “Methods”close()
Section titled “close()”close(): void;Defined in: relay-sdks/ts/src/frame-reader.ts:66
Stop delivering and cancel the pending poll. Later events are ignored.
Returns
Section titled “Returns”void
onObject()
Section titled “onObject()”onObject(object): void;Defined in: relay-sdks/ts/src/frame-reader.ts:56
Feeds the object to the sequencer and delivers what is ready.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
object |
MoqtObject |
Returns
Section titled “Returns”void
onRestarted()
Section titled “onRestarted()”onRestarted(): void;Defined in: relay-sdks/ts/src/frame-reader.ts:62
A want’s Restart: the sequencer starts over and marks the next frame.
Returns
Section titled “Returns”void
onSubgroupEnd()
Section titled “onSubgroupEnd()”onSubgroupEnd(info): void;Defined in: relay-sdks/ts/src/frame-reader.ts:58
Ends the object’s group.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
info |
{ groupId: number; } |
info.groupId |
number |
Returns
Section titled “Returns”void
onSubgroupReset()
Section titled “onSubgroupReset()”onSubgroupReset(info): void;Defined in: relay-sdks/ts/src/frame-reader.ts:60
Resets the object’s group: its remaining objects will not come.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
info |
{ groupId: number; } |
info.groupId |
number |
Returns
Section titled “Returns”void
onSubscribed()
Section titled “onSubscribed()”onSubscribed(info): void;Defined in: relay-sdks/ts/src/frame-reader.ts:54
Takes the track properties, which may declare the Timescale.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
info |
SubscribeOk |
Returns
Section titled “Returns”void
onSwitched()
Section titled “onSwitched()”onSwitched(info): void;Defined in: relay-sdks/ts/src/frame-reader.ts:64
A want’s Move: the same, with the new subscription’s track properties.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
info |
WantSwitchedInfo |
Returns
Section titled “Returns”void