Type Alias: SubscribeOptions
SubscribeOptions =
object
Parameters for subscribing to a track's live objects.
Examples
From the next object
await client.subscribe({
fullTrackName,
priority: 0,
groupOrder: GroupOrder.Original,
forward: true,
locationFilter: new LocationFilter(LocationFilterType.NextObject)
})Groups 100 through 120
await client.subscribe({
fullTrackName,
priority: 32,
groupOrder: GroupOrder.Original,
forward: true,
locationFilter: new LocationFilter(LocationFilterType.AbsoluteStartGroupEnd, 100n, 0n, 120n)
})From the next object, filling the current group from its start
await client.subscribe({
fullTrackName,
priority: 0,
groupOrder: GroupOrder.Original,
locationFilter: new LocationFilter(LocationFilterType.NextObject),
parameters: [new FillParameters([new LocationFilter(LocationFilterType.RelativeStart, 1n)])]
})Properties
earlyDiscardPolicy?
optionalearlyDiscardPolicy?:EarlyDiscardPolicyConfig
Per-subscription early discard policy. Overrides the client-level default set via MOQtailClient.setEarlyDiscardPolicy.
forward?
optionalforward?:boolean
If present, forward parameter (0x10) is sent with the provided value
fullTrackName
fullTrackName:
FullTrackName
Fully qualified track identifier (FullTrackName).
groupOrder
groupOrder:
GroupOrder
Desired GroupOrder (e.g. GroupOrder.Original) specifying delivery ordering semantics.
locationFilter?
optionallocationFilter?:LocationFilter
The LocationFilter selecting which Objects to deliver. Omitted, the subscription is unfiltered.
onEndOfRange?
optionalonEndOfRange?:EndOfRangeHandler
Called for each End of Range marker on the subscription's fill fetch streams.
ordering?
optionalordering?:ObjectOrdering|"none"
Orders this subscription's objects, its fill included. Overrides MOQtailClientOptions.ordering.
parameters?
optionalparameters?:MessageParameter[]
Optional extension parameters appended to the SUBSCRIBE control message. A FILL_PARAMETERS here also retrieves already-published Objects on a fill fetch stream.
priority
priority:
number
Subscriber priority (0 = highest, 255 = lowest). Values outside range are clamped. Fractional values are rounded.