Skip to content

Type Alias: SubscribeOptions ​

SubscribeOptions = object

Parameters for subscribing to a track's live objects.

Examples ​

From the next object

ts
await client.subscribe({
  fullTrackName,
  priority: 0,
  groupOrder: GroupOrder.Original,
  forward: true,
  locationFilter: new LocationFilter(LocationFilterType.NextObject)
})

Groups 100 through 120

ts
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

ts
await client.subscribe({
  fullTrackName,
  priority: 0,
  groupOrder: GroupOrder.Original,
  locationFilter: new LocationFilter(LocationFilterType.NextObject),
  parameters: [new FillParameters([new LocationFilter(LocationFilterType.RelativeStart, 1n)])]
})

Properties ​

earlyDiscardPolicy? ​

optional earlyDiscardPolicy?: EarlyDiscardPolicyConfig

Per-subscription early discard policy. Overrides the client-level default set via MOQtailClient.setEarlyDiscardPolicy.


forward? ​

optional forward?: 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? ​

optional locationFilter?: LocationFilter

The LocationFilter selecting which Objects to deliver. Omitted, the subscription is unfiltered.


onEndOfRange? ​

optional onEndOfRange?: EndOfRangeHandler

Called for each End of Range marker on the subscription's fill fetch streams.


ordering? ​

optional ordering?: ObjectOrdering | "none"

Orders this subscription's objects, its fill included. Overrides MOQtailClientOptions.ordering.


parameters? ​

optional parameters?: 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.