§10.19.

SUBSCRIBE_TRACKS

The subscriber sends a SUBSCRIBE_TRACKS control message on a new bidirectional stream to a publisher to request PUBLISH messages for all tracks within matching namespaces, as well as future track publications within those namespaces.

SUBSCRIBE_TRACKS Message {
  Type (vi64) = 0x51,
  Length (16),
  Request ID (vi64),
  Track Namespace Prefix (..),
  Number of Parameters (vi64),
  Parameters (..) ...
}
Figure 21: MOQT SUBSCRIBE_TRACKS Message
  • Request ID: See Section 10.1.

  • Track Namespace Prefix: A Track Namespace structure as described in Section 2.4.1 with between 0 and 32 Track Namespace Fields. This prefix is matched against track namespaces known to the publisher. If an endpoint receives a Track Namespace Prefix consisting of greater than 32 Track Namespace Fields, it MUST close the session with a PROTOCOL_VIOLATION.

  • Parameters: The parameters are defined in Section 10.2, though they are handled differently from the same Parameters on Subscriptions, as outlined below.

The publisher will respond with REQUEST_OK or REQUEST_ERROR on the response half of the stream. If the subscriber receives any message other than a REQUEST_OK or a REQUEST_ERROR as the first message on the response half of the stream, then it MUST close the session with a PROTOCOL_VIOLATION. If the SUBSCRIBE_TRACKS is successful, the publisher will send PUBLISH messages on new bidirectional streams for tracks within matching namespaces. If it is an error, the stream will be closed via FIN after REQUEST_ERROR is sent.

Within a session, if a publisher receives a SUBSCRIBE_TRACKS with a Track Namespace Prefix that shares a common prefix with an established SUBSCRIBE_TRACKS, it MUST respond with REQUEST_ERROR with error code PREFIX_OVERLAP. SUBSCRIBE_TRACKS and SUBSCRIBE_NAMESPACE have independent overlap spaces (see Section 10.18).

The publisher MUST ensure the subscriber is authorized to perform this namespace subscription.

SUBSCRIBE_TRACKS is not required for a publisher to send PUBLISH messages to a subscriber. It is useful for subscribers that are only interested in or authorized to access a subset of available tracks.

10.19.1. Parameters on SUBSCRIBE_TRACKS

Any Parameter that can be specified on a Subscription (ie: in SUBSCRIBE) is valid in SUBSCRIBE_TRACKS, unless otherwise specified. These parameters are copied over as the default Subscription parameters when a PUBLISH is sent as a result of SUBSCRIBE_TRACKS. The Parameters are not explicitly communicated, with the exception of FORWARD and GROUP_ORDER as described below.

If the FORWARD parameter (Section 10.2.17) is present in this message and equal to 0, PUBLISH messages resulting from this SUBSCRIBE_TRACKS will set the FORWARD parameter to 0. If the FORWARD parameter is equal to 1 or omitted from this message, PUBLISH messages resulting from this SUBSCRIBE_TRACKS will set the FORWARD parameter to 1, or indicate that value by omitting the parameter (see Section 5.1).

If the GROUP_ORDER parameter (Section 10.2.8) is present in this message, PUBLISH messages resulting from this SUBSCRIBE_TRACKS will include the GROUP_ORDER parameter with the same value. If the GROUP_ORDER parameter is omitted from this message, PUBLISH messages resulting from this SUBSCRIBE_TRACKS will use the publisher's default group order preference (see Section 12.5).

This is one section of the MoQT specification, rendered per-section for quick reference and citation. The authoritative text is draft-ietf-moq-transport-19 at the IETF.