Documentation ¶
Index ¶
- type PublishedTrack
- func (p *PublishedTrack[SubscriberID]) AddPublisher(track *webrtc.TrackRemote) error
- func (p *PublishedTrack[SubscriberID]) Done() <-chan struct{}
- func (p *PublishedTrack[SubscriberID]) Info() webrtc_ext.TrackInfo
- func (p *PublishedTrack[SubscriberID]) Metadata() TrackMetadata
- func (p *PublishedTrack[SubscriberID]) Owner() SubscriberID
- func (p *PublishedTrack[SubscriberID]) SetMetadata(metadata TrackMetadata)
- func (p *PublishedTrack[SubscriberID]) Stop()
- func (p *PublishedTrack[SubscriberID]) Subscribe(subscriberID SubscriberID, controller subscription.SubscriptionController, ...) error
- func (p *PublishedTrack[SubscriberID]) Unsubscribe(subscriberID SubscriberID)
- type SubscriberIdentifier
- type TrackID
- type TrackMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublishedTrack ¶
type PublishedTrack[SubscriberID SubscriberIdentifier] struct { // contains filtered or unexported fields }
Represents a track that a peer has published (has already started sending to the SFU).
func NewPublishedTrack ¶
func NewPublishedTrack[SubscriberID SubscriberIdentifier]( ownerID SubscriberID, requestKeyFrame func(track *webrtc.TrackRemote) error, track *webrtc.TrackRemote, metadata TrackMetadata, logger *logrus.Entry, telemetryBuilder *telemetry.ChildBuilder, ) (*PublishedTrack[SubscriberID], error)
func (*PublishedTrack[SubscriberID]) AddPublisher ¶
func (p *PublishedTrack[SubscriberID]) AddPublisher(track *webrtc.TrackRemote) error
Adds a new publisher to the existing `PublishedTrack`, this happens if we have multiple qualities (layers) on a single track.
func (*PublishedTrack[SubscriberID]) Done ¶
func (p *PublishedTrack[SubscriberID]) Done() <-chan struct{}
func (*PublishedTrack[SubscriberID]) Info ¶
func (p *PublishedTrack[SubscriberID]) Info() webrtc_ext.TrackInfo
func (*PublishedTrack[SubscriberID]) Metadata ¶
func (p *PublishedTrack[SubscriberID]) Metadata() TrackMetadata
func (*PublishedTrack[SubscriberID]) Owner ¶
func (p *PublishedTrack[SubscriberID]) Owner() SubscriberID
func (*PublishedTrack[SubscriberID]) SetMetadata ¶
func (p *PublishedTrack[SubscriberID]) SetMetadata(metadata TrackMetadata)
func (*PublishedTrack[SubscriberID]) Stop ¶
func (p *PublishedTrack[SubscriberID]) Stop()
Stops the published track and all related publishers. You should not use the `PublishedTrack` after calling this method.
func (*PublishedTrack[SubscriberID]) Subscribe ¶
func (p *PublishedTrack[SubscriberID]) Subscribe( subscriberID SubscriberID, controller subscription.SubscriptionController, desiredWidth int, desiredHeight int, logger *logrus.Entry, ) error
Create a new subscription for a given subscriber or update the existing one if necessary.
func (*PublishedTrack[SubscriberID]) Unsubscribe ¶
func (p *PublishedTrack[SubscriberID]) Unsubscribe(subscriberID SubscriberID)
Remove subscriptions with a given subscriber id.
type SubscriberIdentifier ¶
type SubscriberIdentifier interface { comparable fmt.Stringer }
A subscruber identifier is something that is comparable and convertable to a String.
type TrackMetadata ¶
Metadata that we have received about this track from a user. This metadata is only set for video tracks at the moment.