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
ThePublishNamespace class represents a MOQT PublishNamespace control message (formerly known as “Announce”). It allows publishers to declare their intent to publish tracks within a specific namespace, along with any associated parameters.
Class Definition
Properties
Unique identifier for this publish namespace request. Used to correlate with PublishNamespaceOk or PublishNamespaceError responses.
The namespace tuple that identifies the collection of tracks. Typically a hierarchical path like
video/conference/room1.Additional protocol parameters for the namespace announcement. Can include authorization tokens, capabilities, or custom metadata.
Methods
getType
Returns the control message type identifier.ControlMessageType.PublishNamespace
serialize
Serializes the PublishNamespace message to a frozen byte buffer for transmission.FrozenByteBuffer containing the serialized message
Throws: LengthExceedsMaxError if the payload exceeds 65535 bytes
parsePayload
Deserializes a PublishNamespace message from a byte buffer.Buffer containing the serialized PublishNamespace message payload
PublishNamespace instance
Throws: NotEnoughBytesError if the buffer doesn’t contain enough data
Usage Examples
Announce a Namespace
Announce Without Parameters
Parse Incoming PublishNamespace
Handle Server Response
Namespace Hierarchy
Namespaces are hierarchical and typically organized by content type and specificity:Error Codes
The server may respond with aPublishNamespaceError message containing one of these error codes:
Server encountered an internal error
Client is not authorized to publish to this namespace
Request timed out
Server does not support publishing to this namespace
Server has no subscribers interested in this namespace
Authorization token is malformed
Referenced auth token alias is unknown
Authorization token has expired
Best Practices
The namespace does not include the individual track names. Use
FullTrackName to combine the namespace with a track name when publishing.Related Types
- Tuple - Hierarchical namespace representation
- KeyValuePair - Protocol parameters
- FullTrackName - Complete track identifier
See Also
- SubscribeNamespace - Subscribe to namespace announcements
- Publish - Publish individual tracks