moqt.Session by using the TrackMux.Publish, TrackMux.PublishFunc, or TrackMux.Announce methods on the associated moqt.TrackMux.
When a track is published on a moqt.TrackMux, it distributes Announcement to all listeners.
Announce Broadcasts
Broadcasts are announced when they are registered with themoqt.TrackMux. This can be done using the TrackMux.Announce method, or by using TrackMux.Publish or TrackMux.PublishFunc, which internally create the announcement.
Discover Broadcasts
Peers can discover available broadcasts by specifying the prefix for the broadcast path they are interested in and listening for announcements. To be able to listen for announcements with a specific prefix, use theSession.AcceptAnnounce method. This returns a moqt.AnnouncementReader, which allows you to read incoming announcements.
Note: Loop AvoidanceWhen
AcceptAnnounce is called, the TrackMux’s hop ID is automatically sent as ExcludeHop in the ANNOUNCE_REQUEST message. This prevents announcement loops in relay topologies. See Relay — Hop ID and Loop Avoidance for details.