Documentation Index
Fetch the complete documentation index at: https://mintlify.com/moqtail/moqtail/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheSubscribe class represents a MOQT Subscribe control message. It allows clients to request streaming objects from a specific track, with configurable filtering, priority, and delivery ordering options.
Class Definition
Properties
Unique identifier for this subscription request.
The fully qualified track name consisting of a namespace tuple and track name.
Priority value (0-255) for this subscription. Higher priority subscriptions receive objects first.
Specifies the order in which groups should be delivered:
GroupOrder.Original(0x0): Original orderGroupOrder.Ascending(0x1): Ascending orderGroupOrder.Descending(0x2): Descending order
If
true, objects are delivered forward from the start location. If false, objects are delivered in reverse.Determines which objects to receive:
FilterType.NextGroupStart(0x1): Start from the next available groupFilterType.LatestObject(0x2): Start from the latest objectFilterType.AbsoluteStart(0x3): Start from an absolute locationFilterType.AbsoluteRange(0x4): Request a specific range of groups
Starting location for
AbsoluteStart and AbsoluteRange filter types. Contains group and object indices.Ending group for
AbsoluteRange filter type. Must be greater than or equal to the start group.Additional protocol parameters for the subscription.
Static Factory Methods
newNextGroupStart
Creates a subscription that starts from the next available group.Unique request identifier
Track to subscribe to
Priority level (0-255)
Delivery order for groups
Direction of delivery
Additional parameters
Subscribe instance with FilterType.NextGroupStart
newLatestObject
Creates a subscription that starts from the latest available object.Subscribe instance with FilterType.LatestObject
newAbsoluteStart
Creates a subscription that starts from a specific location and continues indefinitely.The group and object location to start from
Subscribe instance with FilterType.AbsoluteStart
newAbsoluteRange
Creates a subscription for a specific range of groups.The group and object location to start from
The last group to receive (inclusive)
Subscribe instance with FilterType.AbsoluteRange
Throws: Error if endGroup < startLocation.group
Methods
serialize
Serializes the Subscribe message to a frozen byte buffer for transmission.FrozenByteBuffer containing the serialized message
Throws:
ErrorifstartLocationis missing forAbsoluteStartorAbsoluteRangeErrorifendGroupis missing forAbsoluteRange
parsePayload
Deserializes a Subscribe message from a byte buffer.Buffer containing the serialized Subscribe message payload
Subscribe instance
Throws: Error if the buffer contains invalid or incomplete data
Usage Examples
Subscribe to Latest Content
Subscribe to Specific Range
Parse Incoming Subscribe
Related Types
- FullTrackName - Track identifier
- Location - Group and object position
- KeyValuePair - Protocol parameters
- FilterType - Subscription filter options
- GroupOrder - Group delivery order
See Also
- Fetch - Request specific objects without subscribing
- TrackStatus - Query track availability