Versions in this module Expand all Collapse all v1 v1.13.7 Sep 18, 2026 v1.13.6 Sep 18, 2026 Changes in this version + const AudioLevelQuantization + const DataTrackDataChannel + const LossyDataChannel + const PingIntervalSeconds + const PingTimeoutSeconds + const ReliableDataChannel + var ErrAlreadyJoined = errors.New("a participant with the same identity is already in the room") + var ErrDataChannelBufferFull = errors.New("data channel buffer is full") + var ErrDataChannelUnavailable = errors.New("data channel is not available") + var ErrEmptyIdentity = errors.New("participant identity cannot be empty") + var ErrEmptyParticipantID = errors.New("participant ID cannot be empty") + var ErrICECredentialMismatch = errors.New("ice credential mismatch") + var ErrIceRestartOnClosedPeerConnection = errors.New("ICE restart on closed peer connection") + var ErrIceRestartWithoutLocalSDP = errors.New("ICE restart without local SDP settled") + var ErrInternalError = errors.New("internal error") + var ErrInvalidSDPFragment = errors.New("invalid sdp fragment") + var ErrJobShutdownTimeout = psrpc.NewErrorf(psrpc.DeadlineExceeded, "timed out waiting for agent job to shutdown") + var ErrLimitExceeded = errors.New("node has exceeded its configured limit") + var ErrMaxParticipantsExceeded = errors.New("room has exceeded its max participants") + var ErrMidMismatch = errors.New("media mid does not match bundle mid") + var ErrMidNotFound = errors.New("mid not found") + var ErrMissingGrants = errors.New("VideoGrant is missing") + var ErrMoveOldClientVersion = errors.New("participant client version does not support moving") + var ErrNoBundleMid = errors.New("could not get bundle mid") + var ErrNoICETransport = errors.New("no ICE transport") + var ErrNoLocalDescription = errors.New("no local description") + var ErrNoReceiver = errors.New("cannot subscribe without a receiver in place") + var ErrNoRemoteDescription = errors.New("no remote description") + var ErrNoSender = errors.New("no sender") + var ErrNoSubscribeMetricsPermission = errors.New("participant is not given permission to subscribe to metrics") + var ErrNoSubscribePermission = errors.New("participant is not given permission to subscribe to tracks") + var ErrNoTrackPermission = errors.New("participant is not allowed to subscribe to this track") + var ErrNoTransceiver = errors.New("no transceiver") + var ErrNotOpen = errors.New("track is not open") + var ErrNotSynchronousLocalCandidatesMode = errors.New("not using synchronous local candidates mode") + var ErrParticipantSessionClosed = errors.New("participant session is already closed") + var ErrPermissionDenied = errors.New("no permissions to access the room") + var ErrRoomClosed = errors.New("room has already closed") + var ErrSubscriptionLimitExceeded = errors.New("participant has exceeded its subscription limit") + var ErrSubscriptionPermissionNeedsId = errors.New("either participant identity or SID needed") + var ErrTrackNotBound = errors.New("track not bound") + var ErrTrackNotFound = errors.New("track cannot be found") + var ErrTransportFailure = errors.New("transport failure") + func BroadcastDataMessageForRoom(r types.Room, source types.LocalParticipant, data []byte, logger logger.Logger) + func BroadcastDataPacketForRoom(r types.Room, source types.LocalParticipant, kind livekit.DataPacket_Kind, ...) + func BroadcastMetricsForRoom(r types.Room, source types.Participant, dp *livekit.DataPacket, ...) + func BytesTrackIDForParticipantID(typ BytesTrackType, participantID livekit.ParticipantID) livekit.TrackID + func ChunkProtoBatch[T proto.Message](batch []T, target int) [][]T + func CompareParticipant(pi1 *livekit.ParticipantInfo, pi2 *livekit.ParticipantInfo) int + func GetOtherParticipantInfo(lp types.LocalParticipant, isMigratingIn bool, ...) []*livekit.ParticipantInfo + func IsCloseNotifySkippable(closeReason types.ParticipantCloseReason) bool + func IsCodecEnabled(codecs []*livekit.Codec, cap webrtc.RTPCodecCapability) bool + func IsEOF(err error) bool + func IsParticipantExemptFromTrackPermissionsRestrictions(p types.LocalParticipant) bool + func IsRedEnabled(ti *livekit.TrackInfo) bool + func LoggerWithCodecMime(l logger.Logger, mimeType mime.MimeType) logger.Logger + func LoggerWithPCTarget(l logger.Logger, target livekit.SignalTarget) logger.Logger + func LoggerWithParticipant(l logger.Logger, identity livekit.ParticipantIdentity, ...) logger.Logger + func LoggerWithRoom(l logger.Logger, name livekit.RoomName, roomID livekit.RoomID) logger.Logger + func LoggerWithTrack(l logger.Logger, trackID livekit.TrackID, isRelayed bool) logger.Logger + func MaybeTruncateIP(addr string) string + func NewMockParticipant(identity livekit.ParticipantIdentity, protocol types.ProtocolVersion, ...) *typesfakes.FakeLocalParticipant + func NewMockTrack(kind livekit.TrackType, name string) *typesfakes.FakeMediaTrack + func PackDataTrackLabel(participantID livekit.ParticipantID, trackID livekit.TrackID, label string) string + func PackStreamID(participantID livekit.ParticipantID, trackID livekit.TrackID) string + func PackSyncStreamID(participantID livekit.ParticipantID, stream string) string + func Recover(l logger.Logger) any + func SendParticipantUpdates(updates []*ParticipantUpdate, participants []types.LocalParticipant, ...) + func StartParticipantEgress(ctx context.Context, launcher EgressLauncher, ts telemetry.TelemetryService, ...) error + func StartTrackEgress(ctx context.Context, launcher EgressLauncher, ts telemetry.TelemetryService, ...) error + func StreamFromTrackSource(source livekit.TrackSource) string + func ToProtoTrackKind(kind webrtc.RTPCodecType) livekit.TrackType + func UnpackDataTrackLabel(packed string) (participantID livekit.ParticipantID, trackID livekit.TrackID, label string) + func UnpackStreamID(packed string) (participantID livekit.ParticipantID, trackID livekit.TrackID) + type AgentStore interface + DeleteAgentDispatch func(ctx context.Context, dispatch *livekit.AgentDispatch) error + DeleteAgentJob func(ctx context.Context, job *livekit.Job) error + ListAgentDispatches func(ctx context.Context, roomName livekit.RoomName) ([]*livekit.AgentDispatch, error) + StoreAgentDispatch func(ctx context.Context, dispatch *livekit.AgentDispatch) error + StoreAgentJob func(ctx context.Context, job *livekit.Job) error + type AnyTransportHandler struct + func (h AnyTransportHandler) OnFailed(_isShortLived bool, _ici *types.ICEConnectionInfo) + func (h AnyTransportHandler) OnICECandidate(c *webrtc.ICECandidate, target livekit.SignalTarget) error + func (h AnyTransportHandler) OnNegotiationFailed() + type BytesSignalStats struct + func NewBytesSignalStats(ctx context.Context, telemetryService telemetry.TelemetryService) *BytesSignalStats + func (s *BytesSignalStats) OnTrackStats(key telemetry.StatsKey, stat *livekit.AnalyticsStat) + func (s *BytesSignalStats) Reset() + func (s *BytesSignalStats) ResolveParticipant(pi *livekit.ParticipantInfo) + func (s *BytesSignalStats) ResolveRoom(ri *livekit.Room) + type BytesTrackStats struct + func NewBytesTrackStats(country string, trackID livekit.TrackID, pID livekit.ParticipantID, ...) *BytesTrackStats + func (s *BytesTrackStats) AddBytes(bytes uint64, isSend bool) + func (s *BytesTrackStats) GetTrafficTotals() *TrafficTotals + func (s *BytesTrackStats) Stop() + type BytesTrackType string + const BytesTrackTypeData + const BytesTrackTypeSignal + type ClientInfo struct + func (c ClientInfo) CanHandleReconnectResponse() bool + func (c ClientInfo) ComplyWithCodecOrderInSDPAnswer() bool + func (c ClientInfo) FireTrackByRTPPacket() bool + func (c ClientInfo) HasCapability(cap livekit.ClientInfo_Capability) bool + func (c ClientInfo) SupportsAudioRED() bool + func (c ClientInfo) SupportsChangeRTPSenderEncodingActive() bool + func (c ClientInfo) SupportsCodecChange() bool + func (c ClientInfo) SupportsICETCP() bool + func (c ClientInfo) SupportsPacketTrailer() bool + func (c ClientInfo) SupportsPrflxOverRelay() bool + func (c ClientInfo) SupportsRequestResponse() bool + func (c ClientInfo) SupportsSctpZeroChecksum() bool + func (c ClientInfo) SupportsTrackSubscribedEvent() bool + func (c ClientInfo) SupportsTransceiverReuse() bool + type DataDownTrack struct + func NewDataDownTrack(params DataDownTrackParams) (*DataDownTrack, error) + func (d *DataDownTrack) Close() + func (d *DataDownTrack) Handle() uint16 + func (d *DataDownTrack) ID() livekit.TrackID + func (d *DataDownTrack) Name() string + func (d *DataDownTrack) PublishDataTrack() types.DataTrack + func (d *DataDownTrack) SubscriberID() livekit.ParticipantID + func (d *DataDownTrack) UpdateSubscriptionOptions(subscriptionOptions *livekit.DataTrackSubscriptionOptions) + func (d *DataDownTrack) WritePacket(data []byte, packet *datatrack.Packet, _arrivalTime int64) + type DataDownTrackParams struct + BytesTrackStats *BytesTrackStats + Handle uint16 + Logger logger.Logger + PublishDataTrack types.DataTrack + SubscriberID livekit.ParticipantID + Transport types.DataTrackTransport + type DataTrack struct + func NewDataTrack(params DataTrackParams, dti *livekit.DataTrackInfo) *DataTrack + func (d *DataTrack) AddDataDownTrack(dts types.DataTrackSender) error + func (d *DataTrack) AddSubscriber(sub types.LocalParticipant) (types.DataDownTrack, error) + func (d *DataTrack) Close() + func (d *DataTrack) DeleteDataDownTrack(subscriberID livekit.ParticipantID) + func (d *DataTrack) HandlePacket(data []byte, packet *datatrack.Packet, arrivalTime int64) + func (d *DataTrack) ID() livekit.TrackID + func (d *DataTrack) IsSubscriber(subID livekit.ParticipantID) bool + func (d *DataTrack) Name() string + func (d *DataTrack) PubHandle() uint16 + func (d *DataTrack) PublisherID() livekit.ParticipantID + func (d *DataTrack) PublisherIdentity() livekit.ParticipantIdentity + func (d *DataTrack) RemoveSubscriber(subID livekit.ParticipantID) + func (d *DataTrack) ToProto() *livekit.DataTrackInfo + type DataTrackInfo struct + DataTrack types.DataTrack + PublisherID livekit.ParticipantID + PublisherIdentity livekit.ParticipantIdentity + type DataTrackParams struct + BytesTrackStats *BytesTrackStats + Logger logger.Logger + ParticipantID func() livekit.ParticipantID + ParticipantIdentity livekit.ParticipantIdentity + type DirectionConfig struct + RTCPFeedback RTCPFeedbackConfig + RTPHeaderExtension RTPHeaderExtensionConfig + type DummyReceiver struct + func NewDummyReceiver(trackID livekit.TrackID, streamId string, codec webrtc.RTPCodecParameters, ...) *DummyReceiver + func (d *DummyReceiver) AddDownTrack(track sfu.TrackSender) error + func (d *DummyReceiver) AddOnCodecStateChange(f func(codec webrtc.RTPCodecParameters, state sfu.ReceiverCodecState)) + func (d *DummyReceiver) AddOnReady(f func()) + func (d *DummyReceiver) Codec() webrtc.RTPCodecParameters + func (d *DummyReceiver) CodecState() sfu.ReceiverCodecState + func (d *DummyReceiver) DebugInfo() map[string]any + func (d *DummyReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID) + func (d *DummyReceiver) GetAudioLevel() (float64, bool) + func (d *DummyReceiver) GetDownTracks() []sfu.TrackSender + func (d *DummyReceiver) GetLayeredBitrate() ([]int32, sfu.Bitrates) + func (d *DummyReceiver) GetPrimaryReceiverForRed() sfu.TrackReceiver + func (d *DummyReceiver) GetRedReceiver() sfu.TrackReceiver + func (d *DummyReceiver) GetTemporalLayerFpsForSpatial(spatial int32) []float32 + func (d *DummyReceiver) GetTrackStats() *livekit.RTPStats + func (d *DummyReceiver) HeaderExtensions() []webrtc.RTPHeaderExtensionParameter + func (d *DummyReceiver) IsClosed() bool + func (d *DummyReceiver) Mime() mime.MimeType + func (d *DummyReceiver) ReadRTP(buf []byte, layer uint8, esn uint64) (int, error) + func (d *DummyReceiver) Receiver() sfu.TrackReceiver + func (d *DummyReceiver) Restart(reason string) + func (d *DummyReceiver) SendPLI(layer int32, force bool) + func (d *DummyReceiver) SetMaxExpectedSpatialLayer(layer int32) + func (d *DummyReceiver) StreamID() string + func (d *DummyReceiver) TrackID() livekit.TrackID + func (d *DummyReceiver) TrackInfo() *livekit.TrackInfo + func (d *DummyReceiver) UpdateTrackInfo(ti *livekit.TrackInfo) + func (d *DummyReceiver) Upgrade(receiver sfu.TrackReceiver) + func (d *DummyReceiver) VideoLayerMode() livekit.VideoLayer_Mode + func (d *DummyReceiver) VideoSizes() []codec.VideoSize + type DummyRedReceiver struct + func NewDummyRedReceiver(d *DummyReceiver, isRedEncoding bool) *DummyRedReceiver + func (d *DummyRedReceiver) AddDownTrack(track sfu.TrackSender) error + func (d *DummyRedReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID) + func (d *DummyRedReceiver) GetDownTracks() []sfu.TrackSender + func (d *DummyRedReceiver) ReadRTP(buf []byte, layer uint8, esn uint64) (int, error) + type EgressLauncher interface + StartEgress func(context.Context, *rpc.StartEgressRequest) (*livekit.EgressInfo, error) + StopEgress func(context.Context, *livekit.StopEgressRequest) (*livekit.EgressInfo, error) + type MediaLossProxy struct + func NewMediaLossProxy(params MediaLossProxyParams) *MediaLossProxy + func (m *MediaLossProxy) HandleMaxLossFeedback(_ *sfu.DownTrack, report *rtcp.ReceiverReport) + func (m *MediaLossProxy) NotifySubscriberNodeMediaLoss(_nodeID livekit.NodeID, fractionalLoss uint8) + func (m *MediaLossProxy) OnMediaLossUpdate(f func(fractionalLoss uint8)) + type MediaLossProxyParams struct + Logger logger.Logger + type MediaTrack struct + func NewMediaTrack(params MediaTrackParams, ti *livekit.TrackInfo) *MediaTrack + func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track sfu.TrackRemote, mid string) (bool, bool) + func (t *MediaTrack) ClearSubscriberNodes() + func (t *MediaTrack) Close(isExpectedToResume bool) + func (t *MediaTrack) GetCidsForMimeType(mimeType mime.MimeType) (string, string) + func (t *MediaTrack) GetConnectionScoreAndQuality() (float32, livekit.ConnectionQuality) + func (t *MediaTrack) GetMimeTypeForSdpCid(cid string) mime.MimeType + func (t *MediaTrack) HasPendingCodec() bool + func (t *MediaTrack) HasSdpCid(cid string) bool + func (t *MediaTrack) HasSignalCid(cid string) bool + func (t *MediaTrack) Logger() logger.Logger + func (t *MediaTrack) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, qualities []types.SubscribedCodecQuality) + func (t *MediaTrack) NotifySubscriptionNode(nodeID livekit.NodeID, codecs []*livekit.SubscribedAudioCodec) + func (t *MediaTrack) OnDynacastSubscribedAudioCodecChange(codecs []*livekit.SubscribedAudioCodec) + func (t *MediaTrack) OnDynacastSubscribedMaxQualityChange(subscribedQualities []*livekit.SubscribedCodec, ...) + func (t *MediaTrack) OnSubscribedAudioCodecChange(f func(trackID livekit.TrackID, codecs []*livekit.SubscribedAudioCodec) error) + func (t *MediaTrack) OnSubscribedMaxQualityChange(f func(trackID livekit.TrackID, trackInfo *livekit.TrackInfo, ...) error) + func (t *MediaTrack) OnTrackSubscribed() + func (t *MediaTrack) Restart() + func (t *MediaTrack) SetMuted(muted bool) + func (t *MediaTrack) SetRTT(rtt uint32) + func (t *MediaTrack) ToProto() *livekit.TrackInfo + type MediaTrackParams struct + AudioConfig sfu.AudioConfig + BufferFactory *buffer.Factory + EnableRTPStreamRestartDetection bool + ForceBackupCodecPolicySimulcast bool + ForwardStats *sfu.ForwardStats + Logger logger.Logger + OnRTCP func([]rtcp.Packet) + OnTrackEverSubscribed func(livekit.TrackID) + PLIThrottleConfig sfu.PLIThrottleConfig + ParticipantCountry string + ParticipantID func() livekit.ParticipantID + ParticipantIdentity livekit.ParticipantIdentity + ParticipantKind livekit.ParticipantInfo_Kind + ParticipantKindDetails []livekit.ParticipantInfo_KindDetail + ParticipantVersion uint32 + PreferVideoSizeFromMedia bool + ReceiverConfig ReceiverConfig + Reporter roomobs.TrackReporter + ShouldRegressCodec func() bool + SimTracks map[uint32]interceptor.SimulcastTrackInfo + SubscriberConfig DirectionConfig + TelemetryListener types.ParticipantTelemetryListener + UpdateTrackInfoByVideoSizeChange bool + VideoConfig config.VideoConfig + type MediaTrackReceiver struct + func NewMediaTrackReceiver(params MediaTrackReceiverParams, ti *livekit.TrackInfo) *MediaTrackReceiver + func (t *MediaTrackReceiver) ActiveReceiver() sfu.TrackReceiver + func (t *MediaTrackReceiver) AddOnClose(f func(isExpectedToResume bool)) + func (t *MediaTrackReceiver) AddSubscriber(sub types.LocalParticipant) (types.SubscribedTrack, error) + func (t *MediaTrackReceiver) ClearAllReceivers(isExpectedToResume bool) + func (t *MediaTrackReceiver) ClearReceiver(mime mime.MimeType, isExpectedToResume bool) + func (t *MediaTrackReceiver) Close(isExpectedToResume bool) + func (t *MediaTrackReceiver) DebugInfo() map[string]any + func (t *MediaTrackReceiver) GetAudioLevel() (float64, bool) + func (t *MediaTrackReceiver) GetQualityForDimension(mimeType mime.MimeType, width, height uint32) livekit.VideoQuality + func (t *MediaTrackReceiver) GetTemporalLayerForSpatialFps(mimeType mime.MimeType, spatial int32, fps uint32) int32 + func (t *MediaTrackReceiver) GetTrackStats() *livekit.RTPStats + func (t *MediaTrackReceiver) HandleReceiverCodecChange(r sfu.TrackReceiver, codec webrtc.RTPCodecParameters, ...) + func (t *MediaTrackReceiver) HasPacketTrailer() bool + func (t *MediaTrackReceiver) ID() livekit.TrackID + func (t *MediaTrackReceiver) IsEncrypted() bool + func (t *MediaTrackReceiver) IsMuted() bool + func (t *MediaTrackReceiver) IsOpen() bool + func (t *MediaTrackReceiver) Kind() livekit.TrackType + func (t *MediaTrackReceiver) MaybeSetSimulcast() + func (t *MediaTrackReceiver) Name() string + func (t *MediaTrackReceiver) NotifyMaxLayerChange(mimeType mime.MimeType, maxLayer int32) + func (t *MediaTrackReceiver) OnCodecRegression(f func(old, new webrtc.RTPCodecParameters)) + func (t *MediaTrackReceiver) OnMediaLossFeedback(f func(dt *sfu.DownTrack, rr *rtcp.ReceiverReport)) + func (t *MediaTrackReceiver) OnSetupReceiver(f func(mime mime.MimeType)) + func (t *MediaTrackReceiver) PrimaryReceiver() sfu.TrackReceiver + func (t *MediaTrackReceiver) PublisherID() livekit.ParticipantID + func (t *MediaTrackReceiver) PublisherIdentity() livekit.ParticipantIdentity + func (t *MediaTrackReceiver) PublisherVersion() uint32 + func (t *MediaTrackReceiver) Receiver(mime mime.MimeType) sfu.TrackReceiver + func (t *MediaTrackReceiver) Receivers() []sfu.TrackReceiver + func (t *MediaTrackReceiver) RemoveSubscriber(subscriberID livekit.ParticipantID, isExpectedToResume bool) + func (t *MediaTrackReceiver) Restart() + func (t *MediaTrackReceiver) RevokeDisallowedSubscribers(allowedSubscriberIdentities []livekit.ParticipantIdentity) []livekit.ParticipantIdentity + func (t *MediaTrackReceiver) SetClosing(isExpectedToResume bool) + func (t *MediaTrackReceiver) SetLayerSsrcsForRid(mimeType mime.MimeType, rid string, ssrc uint32, repairSSRC uint32) + func (t *MediaTrackReceiver) SetMuted(muted bool) + func (t *MediaTrackReceiver) SetPotentialCodecs(codecs []webrtc.RTPCodecParameters, ...) + func (t *MediaTrackReceiver) SetRTT(rtt uint32) + func (t *MediaTrackReceiver) SetupReceiver(receiver sfu.TrackReceiver, priority int, mid string) + func (t *MediaTrackReceiver) Source() livekit.TrackSource + func (t *MediaTrackReceiver) Stream() string + func (t *MediaTrackReceiver) TrackInfo() *livekit.TrackInfo + func (t *MediaTrackReceiver) TrackInfoClone() *livekit.TrackInfo + func (t *MediaTrackReceiver) TryClose() bool + func (t *MediaTrackReceiver) UpdateAudioTrack(update *livekit.UpdateLocalAudioTrack) + func (t *MediaTrackReceiver) UpdateCodecInfo(codecs []*livekit.SimulcastCodec) + func (t *MediaTrackReceiver) UpdateCodecRids(mimeType mime.MimeType, rids buffer.VideoLayersRid) + func (t *MediaTrackReceiver) UpdateCodecSdpCid(mimeType mime.MimeType, sdpCid string) + func (t *MediaTrackReceiver) UpdateTrackInfo(ti *livekit.TrackInfo) + func (t *MediaTrackReceiver) UpdateVideoSize(mimeType mime.MimeType, sizes []codec.VideoSize) + func (t *MediaTrackReceiver) UpdateVideoTrack(update *livekit.UpdateLocalVideoTrack) + type MediaTrackReceiverParams struct + AudioConfig sfu.AudioConfig + IsRelayed bool + Logger logger.Logger + MediaTrack types.MediaTrack + ParticipantID func() livekit.ParticipantID + ParticipantIdentity livekit.ParticipantIdentity + ParticipantVersion uint32 + PreferVideoSizeFromMedia bool + ReceiverConfig ReceiverConfig + RegressionTargetCodec mime.MimeType + SubscriberConfig DirectionConfig + TelemetryListener types.ParticipantTelemetryListener + type MediaTrackSubscriptions struct + func NewMediaTrackSubscriptions(params MediaTrackSubscriptionsParams) *MediaTrackSubscriptions + func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, wr *WrappedReceiver) (types.SubscribedTrack, error) + func (t *MediaTrackSubscriptions) DebugInfo() []map[string]any + func (t *MediaTrackSubscriptions) GetAllSubscribers() []livekit.ParticipantID + func (t *MediaTrackSubscriptions) GetAllSubscribersForMime(mime mime.MimeType) []livekit.ParticipantID + func (t *MediaTrackSubscriptions) GetNumSubscribers() int + func (t *MediaTrackSubscriptions) IsSubscriber(subID livekit.ParticipantID) bool + func (t *MediaTrackSubscriptions) OnDownTrackCreated(f func(downTrack *sfu.DownTrack)) + func (t *MediaTrackSubscriptions) OnSubscriberAudioCodecChange(f func(subscriberID livekit.ParticipantID, mime mime.MimeType, enabled bool)) + func (t *MediaTrackSubscriptions) OnSubscriberMaxQualityChange(f func(subscriberID livekit.ParticipantID, mime mime.MimeType, layer int32)) + func (t *MediaTrackSubscriptions) RemoveSubscriber(subscriberID livekit.ParticipantID, isExpectedToResume bool) error + func (t *MediaTrackSubscriptions) SetMuted(muted bool) + func (t *MediaTrackSubscriptions) UpdateVideoLayers() + type MediaTrackSubscriptionsParams struct + IsRelayed bool + Logger logger.Logger + MediaTrack types.MediaTrack + ReceiverConfig ReceiverConfig + SubscriberConfig DirectionConfig + type MigrationDataCache struct + func NewMigrationDataCache(lastSeq uint32, expiredAt time.Time) *MigrationDataCache + func (c *MigrationDataCache) Add(pkt *livekit.DataPacket) MigrationDataCacheState + func (c *MigrationDataCache) Get() []*livekit.DataPacket + type MigrationDataCacheState int + const MigrationDataCacheStateDone + const MigrationDataCacheStateTimeout + const MigrationDataCacheStateWaiting + type PCTransport struct + func NewPCTransport(params TransportParams) (*PCTransport, error) + func (t *PCTransport) AddICECandidate(candidate webrtc.ICECandidateInit) + func (t *PCTransport) AddTrack(trackLocal webrtc.TrackLocal, params types.AddTrackParams, ...) (sender *webrtc.RTPSender, transceiver *webrtc.RTPTransceiver, err error) + func (t *PCTransport) AddTrackToStreamAllocator(subTrack types.SubscribedTrack) + func (t *PCTransport) AddTransceiverFromKind(kind webrtc.RTPCodecType, init webrtc.RTPTransceiverInit) (*webrtc.RTPTransceiver, error) + func (t *PCTransport) AddTransceiverFromTrack(trackLocal webrtc.TrackLocal, params types.AddTrackParams, ...) (sender *webrtc.RTPSender, transceiver *webrtc.RTPTransceiver, err error) + func (t *PCTransport) Close() + func (t *PCTransport) CreateDataChannel(label string, dci *webrtc.DataChannelInit) error + func (t *PCTransport) CreateDataChannelIfEmpty(dcLabel string, dci *webrtc.DataChannelInit) (label string, id uint16, existing bool, err error) + func (t *PCTransport) CreateReadableDataChannel(label string, dci *webrtc.DataChannelInit) error + func (t *PCTransport) CurrentLocalDescription() *webrtc.SessionDescription + func (t *PCTransport) CurrentRemoteDescription() *webrtc.SessionDescription + func (t *PCTransport) GetAnswer() (webrtc.SessionDescription, uint32, error) + func (t *PCTransport) GetICEConnectionInfo() *types.ICEConnectionInfo + func (t *PCTransport) GetICEConnectionType() types.ICEConnectionType + func (t *PCTransport) GetICESessionUfrag() (string, error) + func (t *PCTransport) GetMid(rtpReceiver *webrtc.RTPReceiver) string + func (t *PCTransport) GetPacer() pacer.Pacer + func (t *PCTransport) GetRTPReceiver(mid string) *webrtc.RTPReceiver + func (t *PCTransport) GetRTPTransceiver(mid string) *webrtc.RTPTransceiver + func (t *PCTransport) GetRTT() (float64, bool) + func (t *PCTransport) HandleICERestartSDPFragment(sdpFragment string) (string, error) + func (t *PCTransport) HandleICETrickleSDPFragment(sdpFragment string) error + func (t *PCTransport) HandleRemoteDescription(sd webrtc.SessionDescription, remoteId uint32) error + func (t *PCTransport) HasEverConnected() bool + func (t *PCTransport) ICERestart() error + func (t *PCTransport) IsEstablished() bool + func (t *PCTransport) IsShortConnection(at time.Time) (bool, time.Duration) + func (t *PCTransport) Negotiate(force bool) + func (t *PCTransport) OnNegotiationStateChanged(f func(state transport.NegotiationState)) + func (t *PCTransport) PendingRemoteDescription() *webrtc.SessionDescription + func (t *PCTransport) RTPStreamPublished(ssrc uint32, mid, rid string) + func (t *PCTransport) RemoveTrack(sender *webrtc.RTPSender) error + func (t *PCTransport) RemoveTrackFromStreamAllocator(subTrack types.SubscribedTrack) + func (t *PCTransport) ResetShortConnOnICERestart() + func (t *PCTransport) SendDataMessage(kind livekit.DataPacket_Kind, data []byte) error + func (t *PCTransport) SendDataMessageUnlabeled(data []byte, useRaw bool, sender livekit.ParticipantIdentity) error + func (t *PCTransport) SendDataTrackMessage(data []byte) error + func (t *PCTransport) SetAllowPauseOfStreamAllocator(allowPause bool) + func (t *PCTransport) SetChannelCapacityOfStreamAllocator(channelCapacity int64) + func (t *PCTransport) SetPreferTCP(preferTCP bool) + func (t *PCTransport) SetPreviousSdp(localDescription, remoteDescription *webrtc.SessionDescription) + func (t *PCTransport) SetSignalingRTT(rtt uint32) + func (t *PCTransport) WriteRTCP(pkts []rtcp.Packet) error + type ParticipantImpl struct + func NewParticipant(params ParticipantParams) (*ParticipantImpl, error) + func (p *ParticipantImpl) ActiveAt() time.Time + func (p *ParticipantImpl) AddOnClose(key string, callback func(types.LocalParticipant)) + func (p *ParticipantImpl) AddTrack(req *livekit.AddTrackRequest) + func (p *ParticipantImpl) AddTrackLocal(trackLocal webrtc.TrackLocal, params types.AddTrackParams) (*webrtc.RTPSender, *webrtc.RTPTransceiver, error) + func (p *ParticipantImpl) AddTransceiverFromTrackLocal(trackLocal webrtc.TrackLocal, params types.AddTrackParams) (*webrtc.RTPSender, *webrtc.RTPTransceiver, error) + func (p *ParticipantImpl) CacheDownTrack(trackID livekit.TrackID, rtpTransceiver *webrtc.RTPTransceiver, ...) + func (p *ParticipantImpl) CanPublish() bool + func (p *ParticipantImpl) CanPublishData() bool + func (p *ParticipantImpl) CanPublishSource(source livekit.TrackSource) bool + func (p *ParticipantImpl) CanSkipBroadcast() bool + func (p *ParticipantImpl) CanSubscribe() bool + func (p *ParticipantImpl) CanSubscribeMetrics() bool + func (p *ParticipantImpl) ClaimGrants() *auth.ClaimGrants + func (p *ParticipantImpl) ClearParticipantListener() + func (p *ParticipantImpl) Close(sendLeave bool, reason types.ParticipantCloseReason, isExpectedToResume bool) error + func (p *ParticipantImpl) CloseReason() types.ParticipantCloseReason + func (p *ParticipantImpl) CloseSignalConnection(reason types.SignallingCloseReason) + func (p *ParticipantImpl) ConnectedAt() time.Time + func (p *ParticipantImpl) DebugInfo() map[string]any + func (p *ParticipantImpl) Disconnected() <-chan struct{} + func (p *ParticipantImpl) GetAdaptiveStream() bool + func (p *ParticipantImpl) GetAnswer() (webrtc.SessionDescription, uint32, error) + func (p *ParticipantImpl) GetBufferFactory() *buffer.Factory + func (p *ParticipantImpl) GetCachedDownTrack(trackID livekit.TrackID) (*webrtc.RTPTransceiver, sfu.DownTrackState) + func (p *ParticipantImpl) GetClientConfiguration() *livekit.ClientConfiguration + func (p *ParticipantImpl) GetClientInfo() *livekit.ClientInfo + func (p *ParticipantImpl) GetConnectionQuality() *livekit.ConnectionQualityInfo + func (p *ParticipantImpl) GetCountry() string + func (p *ParticipantImpl) GetDisableSenderReportPassThrough() bool + func (p *ParticipantImpl) GetEnabledPublishCodecs() []*livekit.Codec + func (p *ParticipantImpl) GetLastReliableSequence(migrateOut bool) uint32 + func (p *ParticipantImpl) GetLogger() logger.Logger + func (p *ParticipantImpl) GetLoggerResolver() logger.DeferredFieldResolver + func (p *ParticipantImpl) GetNextSubscribedDataTrackHandle() uint16 + func (p *ParticipantImpl) GetPacer() pacer.Pacer + func (p *ParticipantImpl) GetParticipantListener() types.ParticipantListener + func (p *ParticipantImpl) GetPendingTrack(trackID livekit.TrackID) *livekit.TrackInfo + func (p *ParticipantImpl) GetPlayoutDelayConfig() *livekit.PlayoutDelay + func (p *ParticipantImpl) GetReporter() roomobs.ParticipantSessionReporter + func (p *ParticipantImpl) GetReporterResolver() roomobs.ParticipantReporterResolver + func (p *ParticipantImpl) GetResponseSink() routing.MessageSink + func (p *ParticipantImpl) GetTelemetryListener() types.ParticipantTelemetryListener + func (p *ParticipantImpl) GetTrailer() []byte + func (p *ParticipantImpl) HandleAnswer(sd *livekit.SessionDescription) + func (p *ParticipantImpl) HandleICETrickle(trickleRequest *livekit.TrickleRequest) + func (p *ParticipantImpl) HandleLeaveRequest(reason types.ParticipantCloseReason) + func (p *ParticipantImpl) HandleMetrics(senderParticipantID livekit.ParticipantID, metrics *livekit.MetricsBatch) error + func (p *ParticipantImpl) HandleOffer(sd *livekit.SessionDescription) error + func (p *ParticipantImpl) HandlePublishDataTrackRequest(req *livekit.PublishDataTrackRequest) + func (p *ParticipantImpl) HandleReconnectAndSendResponse(reconnectReason livekit.ReconnectReason, ...) error + func (p *ParticipantImpl) HandleSignalMessage(msg proto.Message) error + func (p *ParticipantImpl) HandleSignalSourceClose() + func (p *ParticipantImpl) HandleSimulateScenario(simulateScenario *livekit.SimulateScenario) error + func (p *ParticipantImpl) HandleSyncState(syncState *livekit.SyncState) error + func (p *ParticipantImpl) HandleUnpublishDataTrackRequest(req *livekit.UnpublishDataTrackRequest) + func (p *ParticipantImpl) HandleUpdateDataSubscription(req *livekit.UpdateDataSubscription) + func (p *ParticipantImpl) HandleUpdateSubscriptionPermission(subscriptionPermission *livekit.SubscriptionPermission) error + func (p *ParticipantImpl) HandleUpdateSubscriptions(trackIDs []livekit.TrackID, participantTracks []*livekit.ParticipantTracks, ...) + func (p *ParticipantImpl) HasConnected() bool + func (p *ParticipantImpl) Hidden() bool + func (p *ParticipantImpl) ICERestart(iceConfig *livekit.ICEConfig) + func (p *ParticipantImpl) ID() livekit.ParticipantID + func (p *ParticipantImpl) Identity() livekit.ParticipantIdentity + func (p *ParticipantImpl) IsAgent() bool + func (p *ParticipantImpl) IsClosed() bool + func (p *ParticipantImpl) IsDependent() bool + func (p *ParticipantImpl) IsDisconnected() bool + func (p *ParticipantImpl) IsIdle() bool + func (p *ParticipantImpl) IsPublisher() bool + func (p *ParticipantImpl) IsReady() bool + func (p *ParticipantImpl) IsReconnect() bool + func (p *ParticipantImpl) IsRecorder() bool + func (p *ParticipantImpl) IsUsingSinglePeerConnection() bool + func (p *ParticipantImpl) IssueFullReconnect(reason types.ParticipantCloseReason) + func (p *ParticipantImpl) Kind() livekit.ParticipantInfo_Kind + func (p *ParticipantImpl) KindDetails() []livekit.ParticipantInfo_KindDetail + func (p *ParticipantImpl) MaybeStartMigration(force bool, onStart func()) bool + func (p *ParticipantImpl) MetricsCollectorBatchReady(mb *livekit.MetricsBatch) + func (p *ParticipantImpl) MetricsCollectorTimeToCollectMetrics() + func (p *ParticipantImpl) MetricsReporterBatchReady(mb *livekit.MetricsBatch) + func (p *ParticipantImpl) MigrateState() types.MigrateState + func (p *ParticipantImpl) MoveToRoom(params types.MoveToRoomParams) + func (p *ParticipantImpl) Negotiate(force bool) + func (p *ParticipantImpl) NotifyMigration() + func (p *ParticipantImpl) OnClaimsChanged(callback func(types.LocalParticipant)) + func (p *ParticipantImpl) OnICEConfigChanged(f func(participant types.LocalParticipant, iceConfig *livekit.ICEConfig)) + func (p *ParticipantImpl) PerformRpc(req *livekit.PerformRpcRequest, resultCh chan string, errorCh chan error) + func (p *ParticipantImpl) ProtocolVersion() types.ProtocolVersion + func (p *ParticipantImpl) SendConnectionQualityUpdate(update *livekit.ConnectionQualityUpdate) error + func (p *ParticipantImpl) SendDataMessage(kind livekit.DataPacket_Kind, data []byte, sender livekit.ParticipantID, ...) error + func (p *ParticipantImpl) SendDataMessageUnlabeled(data []byte, useRaw bool, sender livekit.ParticipantIdentity) error + func (p *ParticipantImpl) SendDataTrackSubscriberHandles(handles map[uint32]*livekit.DataTrackSubscriberHandles_PublishedDataTrack) error + func (p *ParticipantImpl) SendJoinResponse(joinResponse *livekit.JoinResponse) error + func (p *ParticipantImpl) SendParticipantUpdate(participantsToUpdate []*livekit.ParticipantInfo) error + func (p *ParticipantImpl) SendRefreshToken(token string) error + func (p *ParticipantImpl) SendRoomMovedResponse(roomMovedResponse *livekit.RoomMovedResponse) error + func (p *ParticipantImpl) SendRoomUpdate(room *livekit.Room) error + func (p *ParticipantImpl) SendSpeakerUpdate(speakers []*livekit.SpeakerInfo, force bool) error + func (p *ParticipantImpl) SendSubscriptionPermissionUpdate(publisherID livekit.ParticipantID, trackID livekit.TrackID, allowed bool) error + func (p *ParticipantImpl) SetAttributes(attrs map[string]string) + func (p *ParticipantImpl) SetMetadata(metadata string) + func (p *ParticipantImpl) SetMigrateInfo(previousOffer, previousAnswer *webrtc.SessionDescription, ...) + func (p *ParticipantImpl) SetMigrateState(s types.MigrateState) + func (p *ParticipantImpl) SetName(name string) + func (p *ParticipantImpl) SetPermission(permission *livekit.ParticipantPermission) bool + func (p *ParticipantImpl) SetTrackMuted(mute *livekit.MuteTrackRequest, fromAdmin bool) *livekit.TrackInfo + func (p *ParticipantImpl) State() livekit.ParticipantInfo_State + func (p *ParticipantImpl) SupportsCodecChange() bool + func (p *ParticipantImpl) SupportsMoving() error + func (p *ParticipantImpl) SupportsSyncStreamID() bool + func (p *ParticipantImpl) SupportsTransceiverReuse(mt types.MediaTrack) bool + func (p *ParticipantImpl) SwapResponseSink(sink routing.MessageSink, reason types.SignallingCloseReason) + func (p *ParticipantImpl) TelemetryGuard() *telemetry.ReferenceGuard + func (p *ParticipantImpl) ToProto() *livekit.ParticipantInfo + func (p *ParticipantImpl) ToProtoWithVersion() (*livekit.ParticipantInfo, utils.TimedVersion) + func (p *ParticipantImpl) UncacheDownTrack(rtpTransceiver *webrtc.RTPTransceiver) + func (p *ParticipantImpl) UpdateAudioTrack(update *livekit.UpdateLocalAudioTrack) error + func (p *ParticipantImpl) UpdateMediaLoss(nodeID livekit.NodeID, trackID livekit.TrackID, fractionalLoss uint32) error + func (p *ParticipantImpl) UpdateMediaRTT(rtt uint32) + func (p *ParticipantImpl) UpdateMetadata(update *livekit.UpdateParticipantMetadata, fromAdmin bool) error + func (p *ParticipantImpl) UpdateSubscribedAudioCodecs(nodeID livekit.NodeID, trackID livekit.TrackID, ...) error + func (p *ParticipantImpl) UpdateSubscribedQuality(nodeID livekit.NodeID, trackID livekit.TrackID, ...) error + func (p *ParticipantImpl) UpdateVideoTrack(update *livekit.UpdateLocalVideoTrack) error + func (p *ParticipantImpl) Verify() bool + func (p *ParticipantImpl) VerifySubscribeParticipantInfo(pID livekit.ParticipantID, version uint32) + func (p *ParticipantImpl) Version() utils.TimedVersion + type ParticipantOptions struct + AutoSubscribe bool + AutoSubscribeDataTrack bool + type ParticipantParams struct + AdaptiveStream bool + AllowTCPFallback bool + AllowUDPUnstableFallback bool + AudioConfig sfu.AudioConfig + ClientConf *livekit.ClientConfiguration + ClientInfo ClientInfo + Config *WebRTCConfig + CongestionControlConfig config.CongestionControlConfig + Country string + DataChannelMaxBufferedAmount uint64 + DatachannelLossyTargetLatency time.Duration + DatachannelSlowThreshold int + DisableCodecRegression bool + DisableDynacast bool + DisableSenderReportPassThrough bool + DisableSupervisor bool + DisableTransceiverReuseForE2EE bool + EnableDataTracks bool + EnableMetrics bool + EnableRTPStreamRestartDetection bool + FireOnTrackBySdp bool + ForceBackupCodecPolicySimulcast bool + ForwardStats *sfu.ForwardStats + Grants *auth.ClaimGrants + Identity livekit.ParticipantIdentity + InitialVersion uint32 + LastPubReliableSeq uint32 + LimitConfig config.LimitConfig + Logger logger.Logger + LoggerResolver logger.DeferredFieldResolver + MetricConfig metric.MetricConfig + Migration bool + Name livekit.ParticipantName + PLIThrottleConfig sfu.PLIThrottleConfig + ParticipantHelper types.LocalParticipantHelper + ParticipantListener types.LocalParticipantListener + PlayoutDelay *livekit.PlayoutDelay + PreferVideoSizeFromMedia bool + ProtocolVersion types.ProtocolVersion + PublishEnabledCodecs []*livekit.Codec + Reconnect bool + ReconnectOnDataChannelError bool + ReconnectOnPublicationError bool + ReconnectOnSubscriptionError bool + Region string + Reporter roomobs.ParticipantSessionReporter + ReporterResolver roomobs.ParticipantReporterResolver + SID livekit.ParticipantID + SessionStartTime time.Time + SessionTimer *observability.SessionTimer + SimTracks map[uint32]interceptor.SimulcastTrackInfo + Sink routing.MessageSink + SubscribeEnabledCodecs []*livekit.Codec + SubscriberAllowPause bool + SubscriptionLimitAudio int32 + SubscriptionLimitVideo int32 + SyncStreams bool + TCPFallbackRTTThreshold int + TURNSEnabled bool + TelemetryListener types.ParticipantTelemetryListener + Trailer []byte + UseOneShotSignallingMode bool + UseSinglePeerConnection bool + VersionGenerator utils.TimedVersionGenerator + VideoConfig config.VideoConfig + type ParticipantUpdate struct + CloseReason types.ParticipantCloseReason + IsSynthesizedDisconnect bool + ParticipantInfo *livekit.ParticipantInfo + func PushAndDequeueUpdates(pi *livekit.ParticipantInfo, closeReason types.ParticipantCloseReason, ...) []*ParticipantUpdate + type PrimaryTransportHandler struct + func (h PrimaryTransportHandler) OnFullyEstablished() + func (h PrimaryTransportHandler) OnInitialConnected() + type PublisherTransportHandler struct + func (h PublisherTransportHandler) OnAnswer(sd webrtc.SessionDescription, answerId uint32, midToTrackID map[string]string) error + func (h PublisherTransportHandler) OnDataMessage(kind livekit.DataPacket_Kind, data []byte) + func (h PublisherTransportHandler) OnDataMessageUnlabeled(data []byte) + func (h PublisherTransportHandler) OnDataSendError(err error) + func (h PublisherTransportHandler) OnDataTrackMessage(data []byte, arrivalTime int64) + func (h PublisherTransportHandler) OnInitialConnected() + func (h PublisherTransportHandler) OnSetRemoteDescriptionOffer() + func (h PublisherTransportHandler) OnTrack(track *webrtc.TrackRemote, rtpReceiver *webrtc.RTPReceiver) + func (h PublisherTransportHandler) OnUnmatchedMedia(numAudios uint32, numVideos uint32) error + type RTCPFeedbackConfig struct + Audio []webrtc.RTCPFeedback + Video []webrtc.RTCPFeedback + type RTPHeaderExtensionConfig struct + Audio []string + Video []string + type ReceiverConfig struct + PacketBufferSizeAudio int + PacketBufferSizeVideo int + type Room struct + func NewRoom(room *livekit.Room, internal *livekit.RoomInternal, config WebRTCConfig, ...) *Room + func (r *Room) AddAgentDispatch(dispatch *livekit.AgentDispatch) (*livekit.AgentDispatch, error) + func (r *Room) Close(reason types.ParticipantCloseReason) + func (r *Room) CloseIfEmpty() + func (r *Room) DebugInfo() map[string]any + func (r *Room) DeleteAgentDispatch(dispatchID string) (*livekit.AgentDispatch, error) + func (r *Room) FirstJoinedAt() int64 + func (r *Room) GetActiveSpeakers() []*livekit.SpeakerInfo + func (r *Room) GetAgentDispatches(dispatchID string) ([]*livekit.AgentDispatch, error) + func (r *Room) GetBufferFactory() *buffer.Factory + func (r *Room) GetCachedReliableDataMessage(seqs map[livekit.ParticipantID]uint32) []*types.DataMessageCache + func (r *Room) GetLocalParticipants() []types.LocalParticipant + func (r *Room) GetParticipant(identity livekit.ParticipantIdentity) types.LocalParticipant + func (r *Room) GetParticipantByID(participantID livekit.ParticipantID) types.LocalParticipant + func (r *Room) GetParticipantCount() int + func (r *Room) GetParticipantRequestSource(identity livekit.ParticipantIdentity) routing.MessageSource + func (r *Room) GetParticipants() []types.LocalParticipant + func (r *Room) HandleSyncState(participant types.LocalParticipant, state *livekit.SyncState) error + func (r *Room) Hold() bool + func (r *Room) ID() livekit.RoomID + func (r *Room) Internal() *livekit.RoomInternal + func (r *Room) IsClosed() bool + func (r *Room) IsDataMessageUserPacketDuplicate(up *livekit.UserPacket) bool + func (r *Room) Join(participant types.LocalParticipant, requestSource routing.MessageSource, ...) error + func (r *Room) LastLeftAt() int64 + func (r *Room) LocalParticipantListener() types.LocalParticipantListener + func (r *Room) Logger() logger.Logger + func (r *Room) Name() livekit.RoomName + func (r *Room) OnClose(f func()) + func (r *Room) OnParticipantChanged(f func(participant types.Participant)) + func (r *Room) OnRoomUpdated(f func()) + func (r *Room) ParticipantTelemetryListener() types.ParticipantTelemetryListener + func (r *Room) Release() + func (r *Room) RemoveParticipant(identity livekit.ParticipantIdentity, pID livekit.ParticipantID, ...) + func (r *Room) ReplaceParticipantRequestSource(identity livekit.ParticipantIdentity, reqSource routing.MessageSource) + func (r *Room) ResolveDataTrackForSubscriber(sub types.LocalParticipant, trackID livekit.TrackID) types.DataResolverResult + func (r *Room) ResolveMediaTrackForSubscriber(sub types.LocalParticipant, trackID livekit.TrackID) types.MediaResolverResult + func (r *Room) ResumeParticipant(p types.LocalParticipant, requestSource routing.MessageSource, ...) error + func (r *Room) SendDataPacket(dp *livekit.DataPacket, kind livekit.DataPacket_Kind) + func (r *Room) SetMetadata(metadata string) <-chan struct{} + func (r *Room) ToProto() *livekit.Room + func (r *Room) Trailer() []byte + func (r *Room) UpdateSubscriptions(participant types.LocalParticipant, trackIDs []livekit.TrackID, ...) + type RoomTrackManager struct + func NewRoomTrackManager(logger logger.Logger) *RoomTrackManager + func (r *RoomTrackManager) AddDataTrack(dataTrack types.DataTrack, publisherIdentity livekit.ParticipantIdentity, ...) + func (r *RoomTrackManager) AddTrack(track types.MediaTrack, publisherIdentity livekit.ParticipantIdentity, ...) + func (r *RoomTrackManager) GetDataTrackInfo(trackID livekit.TrackID) *DataTrackInfo + func (r *RoomTrackManager) GetOrCreateTrackChangeNotifier(trackID livekit.TrackID) *utils.ChangeNotifier + func (r *RoomTrackManager) GetOrCreateTrackRemoveNotifier(trackID livekit.TrackID) *utils.ChangeNotifier + func (r *RoomTrackManager) GetTrackInfo(trackID livekit.TrackID) *TrackInfo + func (r *RoomTrackManager) HasObservers(track types.MediaTrack) bool + func (r *RoomTrackManager) NotifyTrackChanged(trackID livekit.TrackID) + func (r *RoomTrackManager) RemoveDataTrack(dataTrack types.DataTrack) + func (r *RoomTrackManager) RemoveTrack(track types.MediaTrack) + func (r *RoomTrackManager) Report() (int, int) + type SubscribedTrack struct + func NewSubscribedTrack(params SubscribedTrackParams) (*SubscribedTrack, error) + func (t *SubscribedTrack) AddOnBind(f func(error)) + func (t *SubscribedTrack) Bound(err error) + func (t *SubscribedTrack) Close(isExpectedToResume bool) + func (t *SubscribedTrack) DownTrack() *sfu.DownTrack + func (t *SubscribedTrack) ID() livekit.TrackID + func (t *SubscribedTrack) IsBound() bool + func (t *SubscribedTrack) IsMuted() bool + func (t *SubscribedTrack) MediaTrack() types.MediaTrack + func (t *SubscribedTrack) NeedsNegotiation() bool + func (t *SubscribedTrack) OnBindAndConnected() + func (t *SubscribedTrack) OnClose(f func(bool)) + func (t *SubscribedTrack) OnCodecNegotiated(codec webrtc.RTPCodecCapability) + func (t *SubscribedTrack) OnDownTrackClose(isExpectedToResume bool) + func (t *SubscribedTrack) OnMaxSubscribedLayerChanged(layer int32) + func (t *SubscribedTrack) OnRttUpdate(rtt uint32) + func (t *SubscribedTrack) OnStatsUpdate(stat *livekit.AnalyticsStat) + func (t *SubscribedTrack) OnStreamStarted() + func (t *SubscribedTrack) PublisherID() livekit.ParticipantID + func (t *SubscribedTrack) PublisherIdentity() livekit.ParticipantIdentity + func (t *SubscribedTrack) PublisherVersion() uint32 + func (t *SubscribedTrack) RTPSender() *webrtc.RTPSender + func (t *SubscribedTrack) SetNeedsNegotiation(needs bool) + func (t *SubscribedTrack) SetPublisherMuted(muted bool) + func (t *SubscribedTrack) SetRTPSender(sender *webrtc.RTPSender) + func (t *SubscribedTrack) Subscriber() types.LocalParticipant + func (t *SubscribedTrack) SubscriberID() livekit.ParticipantID + func (t *SubscribedTrack) SubscriberIdentity() livekit.ParticipantIdentity + func (t *SubscribedTrack) UpdateSubscriberSettings(settings *livekit.UpdateTrackSettings, isImmediate bool) + func (t *SubscribedTrack) UpdateVideoLayer() + type SubscribedTrackParams struct + AdaptiveStream bool + IsRelayed bool + MediaTrack types.MediaTrack + OnDownTrackClosed func(subscriberID livekit.ParticipantID) + OnDownTrackCreated func(downTrack *sfu.DownTrack) + OnSubscriberAudioCodecChange func(subscriberID livekit.ParticipantID, mime mime.MimeType, enabled bool) + OnSubscriberMaxQualityChange func(subscriberID livekit.ParticipantID, mime mime.MimeType, layer int32) + ReceiverConfig ReceiverConfig + Subscriber types.LocalParticipant + SubscriberConfig DirectionConfig + TelemetryListener types.ParticipantTelemetryListener + WrappedReceiver *WrappedReceiver + type SubscriberTransportHandler struct + func (h SubscriberTransportHandler) OnDataSendError(err error) + func (h SubscriberTransportHandler) OnInitialConnected() + func (h SubscriberTransportHandler) OnOffer(sd webrtc.SessionDescription, offerId uint32, midToTrackID map[string]string) error + func (h SubscriberTransportHandler) OnStreamStateChange(update *streamallocator.StreamStateUpdate) error + type SubscriptionManager struct + func NewSubscriptionManager(params SubscriptionManagerParams) *SubscriptionManager + func (m *SubscriptionManager) ClearAllSubscriptions() + func (m *SubscriptionManager) Close(isExpectedToResume bool) + func (m *SubscriptionManager) GetSubscribedParticipants() []livekit.ParticipantID + func (m *SubscriptionManager) GetSubscribedTracks() []types.SubscribedTrack + func (m *SubscriptionManager) HasSubscriptions() bool + func (m *SubscriptionManager) IsSubscribedTo(participantID livekit.ParticipantID) bool + func (m *SubscriptionManager) IsTrackNameSubscribed(publisherIdentity livekit.ParticipantIdentity, trackName string) bool + func (m *SubscriptionManager) OnSubscribeStatusChanged(fn func(publisherID livekit.ParticipantID, subscribed bool)) + func (m *SubscriptionManager) ReconcileAll() + func (m *SubscriptionManager) StopAndGetSubscribedTracksForwarderState() map[livekit.TrackID]*livekit.RTPForwarderState + func (m *SubscriptionManager) SubscribeToDataTrack(trackID livekit.TrackID) + func (m *SubscriptionManager) SubscribeToTrack(trackID livekit.TrackID, isSync bool) + func (m *SubscriptionManager) UnsubscribeFromDataTrack(trackID livekit.TrackID) + func (m *SubscriptionManager) UnsubscribeFromTrack(trackID livekit.TrackID) + func (m *SubscriptionManager) UpdateDataTrackSubscriptionOptions(trackID livekit.TrackID, ...) + func (m *SubscriptionManager) UpdateSubscribedTrackSettings(trackID livekit.TrackID, settings *livekit.UpdateTrackSettings) + func (m *SubscriptionManager) WaitUntilSubscribed(timeout time.Duration) error + type SubscriptionManagerParams struct + DataTrackResolver types.DataTrackResolver + Logger logger.Logger + OnSubscriptionError func(trackID livekit.TrackID, fatal bool, err error) + OnTrackSubscribed func(subTrack types.SubscribedTrack) + OnTrackUnsubscribed func(subTrack types.SubscribedTrack) + Participant types.LocalParticipant + SubscriptionLimitAudio int32 + SubscriptionLimitVideo int32 + TelemetryListener types.ParticipantTelemetryListener + TrackResolver types.MediaTrackResolver + UseOneShotSignallingMode bool + type TrackInfo struct + PublisherID livekit.ParticipantID + PublisherIdentity livekit.ParticipantIdentity + Track types.MediaTrack + type TrafficTotals struct + At time.Time + RecvBytes uint64 + RecvMessages uint32 + SendBytes uint64 + SendMessages uint32 + type TransportManager struct + func NewTransportManager(params TransportManagerParams) (*TransportManager, error) + func (t *TransportManager) AddICECandidate(candidate webrtc.ICECandidateInit, target livekit.SignalTarget) + func (t *TransportManager) AddSubscribedTrack(subTrack types.SubscribedTrack) + func (t *TransportManager) AddTrackLocal(trackLocal webrtc.TrackLocal, params types.AddTrackParams, ...) (*webrtc.RTPSender, *webrtc.RTPTransceiver, error) + func (t *TransportManager) AddTransceiverFromTrackLocal(trackLocal webrtc.TrackLocal, params types.AddTrackParams, ...) (*webrtc.RTPSender, *webrtc.RTPTransceiver, error) + func (t *TransportManager) Close() + func (t *TransportManager) GetAnswer() (webrtc.SessionDescription, uint32, error) + func (t *TransportManager) GetDataTrackTransport() types.DataTrackTransport + func (t *TransportManager) GetICEConfig() *livekit.ICEConfig + func (t *TransportManager) GetICEConnectionInfo() []*types.ICEConnectionInfo + func (t *TransportManager) GetPublisherICESessionUfrag() (string, error) + func (t *TransportManager) GetPublisherMid(rtpReceiver *webrtc.RTPReceiver) string + func (t *TransportManager) GetPublisherRTPReceiver(mid string) *webrtc.RTPReceiver + func (t *TransportManager) GetPublisherRTPTransceiver(mid string) *webrtc.RTPTransceiver + func (t *TransportManager) GetPublisherRTT() (float64, bool) + func (t *TransportManager) GetSubscriberPacer() pacer.Pacer + func (t *TransportManager) GetSubscriberRTT() (float64, bool) + func (t *TransportManager) GetUnmatchMediaForOffer(parsedOffer *sdp.SessionDescription, mediaType string) (unmatched []*sdp.MediaDescription, err error) + func (t *TransportManager) HandleAnswer(answer webrtc.SessionDescription, answerId uint32) + func (t *TransportManager) HandleClientReconnect(reason livekit.ReconnectReason) + func (t *TransportManager) HandleICERestartSDPFragment(sdpFragment string) (string, error) + func (t *TransportManager) HandleICETrickleSDPFragment(sdpFragment string) error + func (t *TransportManager) HandleOffer(offer webrtc.SessionDescription, offerId uint32, shouldPend bool) error + func (t *TransportManager) HandleReceiverReport(dt *sfu.DownTrack, report *rtcp.ReceiverReport) + func (t *TransportManager) HasPublisherEverConnected() bool + func (t *TransportManager) HasSubscriberEverConnected() bool + func (t *TransportManager) ICERestart(iceConfig *livekit.ICEConfig) error + func (t *TransportManager) IsPublisherEstablished() bool + func (t *TransportManager) LastPublisherOffer() *webrtc.SessionDescription + func (t *TransportManager) LastPublisherOfferPending() *webrtc.SessionDescription + func (t *TransportManager) LastSeenSignalAt() time.Time + func (t *TransportManager) NegotiateSubscriber(force bool) + func (t *TransportManager) OnICEConfigChanged(f func(iceConfig *livekit.ICEConfig)) + func (t *TransportManager) ProcessPendingPublisherDataChannels() + func (t *TransportManager) ProcessPendingPublisherOffer() + func (t *TransportManager) RTPStreamPublished(ssrc uint32, mid, rid string) + func (t *TransportManager) RemoveSubscribedTrack(subTrack types.SubscribedTrack) + func (t *TransportManager) RemoveTrackLocal(sender *webrtc.RTPSender) error + func (t *TransportManager) SendDataMessage(kind livekit.DataPacket_Kind, data []byte) error + func (t *TransportManager) SendDataMessageUnlabeled(data []byte, useRaw bool, sender livekit.ParticipantIdentity) error + func (t *TransportManager) SetICEConfig(iceConfig *livekit.ICEConfig) + func (t *TransportManager) SetMigrateInfo(previousOffer *webrtc.SessionDescription, ...) + func (t *TransportManager) SetSignalSourceValid(valid bool) + func (t *TransportManager) SetSubscriberAllowPause(allowPause bool) + func (t *TransportManager) SetSubscriberChannelCapacity(channelCapacity int64) + func (t *TransportManager) SinceLastSignal() time.Duration + func (t *TransportManager) SubscriberAsPrimary() bool + func (t *TransportManager) SubscriberClose() + func (t *TransportManager) UpdateLastSeenSignal() + func (t *TransportManager) UpdateMediaRTT(rtt uint32) + func (t *TransportManager) UpdateSignalingRTT(rtt uint32) + func (t *TransportManager) WritePublisherRTCP(pkts []rtcp.Packet) error + func (t *TransportManager) WriteSubscriberRTCP(pkts []rtcp.Packet) error + type TransportManagerParams struct + AllowPlayoutDelay bool + AllowTCPFallback bool + AllowUDPUnstableFallback bool + ClientInfo ClientInfo + Config *WebRTCConfig + CongestionControlConfig config.CongestionControlConfig + DataChannelMaxBufferedAmount uint64 + DataChannelStats *BytesTrackStats + DatachannelLossyTargetLatency time.Duration + DatachannelSlowThreshold int + EnableDataTracks bool + EnabledPublishCodecs []*livekit.Codec + EnabledSubscribeCodecs []*livekit.Codec + FireOnTrackBySdp bool + Logger logger.Logger + Migration bool + ProtocolVersion types.ProtocolVersion + PublisherHandler transport.Handler + SimTracks map[uint32]interceptor.SimulcastTrackInfo + SubscriberAsPrimary bool + SubscriberHandler transport.Handler + TCPFallbackRTTThreshold int + TURNSEnabled bool + Twcc *twcc.Responder + UseOneShotSignallingMode bool + UseSinglePeerConnection bool + type TransportManagerTransportHandler struct + func (h TransportManagerTransportHandler) OnFailed(isShortLived bool, iceConnectionInfo *types.ICEConnectionInfo) + type TransportParams struct + AllowPlayoutDelay bool + ClientInfo ClientInfo + Config *WebRTCConfig + CongestionControlConfig config.CongestionControlConfig + DataChannelMaxBufferedAmount uint64 + DatachannelLossyTargetLatency time.Duration + DatachannelMaxReceiverBufferSize int + DatachannelSlowThreshold int + DirectionConfig DirectionConfig + EnableDataTracks bool + EnabledPublishCodecs []*livekit.Codec + EnabledSubscribeCodecs []*livekit.Codec + FireOnTrackBySdp bool + Handler transport.Handler + IsOfferer bool + IsSendSide bool + Logger logger.Logger + ProtocolVersion types.ProtocolVersion + SimTracks map[uint32]sfuinterceptor.SimulcastTrackInfo + Transport livekit.SignalTarget + Twcc *lktwcc.Responder + UseOneShotSignallingMode bool + type UpDataTrackManager struct + func NewUpDataTrackManager(params UpDataTrackManagerParams) *UpDataTrackManager + func (u *UpDataTrackManager) AddPublishedDataTrack(dt types.DataTrack) + func (u *UpDataTrackManager) Close() + func (u *UpDataTrackManager) GetPublishedDataTrack(handle uint16) types.DataTrack + func (u *UpDataTrackManager) GetPublishedDataTracks() []types.DataTrack + func (u *UpDataTrackManager) HandleReceivedDataTrackMessage(data []byte, packet *datatrack.Packet, arrivalTime int64) + func (u *UpDataTrackManager) RemovePublishedDataTrack(dt types.DataTrack) + func (u *UpDataTrackManager) ToProto() []*livekit.DataTrackInfo + type UpDataTrackManagerParams struct + Logger logger.Logger + Participant types.Participant + type UpTrackManager struct + func NewUpTrackManager(params UpTrackManagerParams) *UpTrackManager + func (u *UpTrackManager) AddPublishedTrack(track types.MediaTrack) + func (u *UpTrackManager) Close(isExpectedToResume bool) + func (u *UpTrackManager) DebugInfo() map[string]any + func (u *UpTrackManager) GetAudioLevel() (level float64, active bool) + func (u *UpTrackManager) GetPublishedTrack(trackID livekit.TrackID) types.MediaTrack + func (u *UpTrackManager) GetPublishedTracks() []types.MediaTrack + func (u *UpTrackManager) HasPermission(trackID livekit.TrackID, subIdentity livekit.ParticipantIdentity) bool + func (u *UpTrackManager) OnPublishedTrackUpdated(f func(track types.MediaTrack)) + func (u *UpTrackManager) OnUpTrackManagerClose(f func()) + func (u *UpTrackManager) RemovePublishedTrack(track types.MediaTrack, isExpectedToResume bool) + func (u *UpTrackManager) SetPublishedTrackMuted(trackID livekit.TrackID, muted bool) (types.MediaTrack, bool) + func (u *UpTrackManager) SubscriptionPermission() (*livekit.SubscriptionPermission, utils.TimedVersion) + func (u *UpTrackManager) ToProto() []*livekit.TrackInfo + func (u *UpTrackManager) UpdatePublishedAudioTrack(update *livekit.UpdateLocalAudioTrack) types.MediaTrack + func (u *UpTrackManager) UpdatePublishedVideoTrack(update *livekit.UpdateLocalVideoTrack) types.MediaTrack + func (u *UpTrackManager) UpdateSubscriptionPermission(subscriptionPermission *livekit.SubscriptionPermission, ...) error + type UpTrackManagerParams struct + Logger logger.Logger + VersionGenerator utils.TimedVersionGenerator + type UserPacketDeduper struct + func NewUserPacketDeduper() *UserPacketDeduper + func (u *UserPacketDeduper) IsDuplicate(up *livekit.UserPacket) bool + type WebRTCConfig struct + BufferFactory *buffer.Factory + Publisher DirectionConfig + Receiver ReceiverConfig + Subscriber DirectionConfig + func NewWebRTCConfig(conf *config.Config) (*WebRTCConfig, error) + func (c *WebRTCConfig) SetBufferFactory(factory *buffer.Factory) + func (c *WebRTCConfig) UpdatePublisherConfig(consolidated bool) + func (c *WebRTCConfig) UpdateSubscriberConfig(ccConf config.CongestionControlConfig) + type WrappedReceiver struct + func NewWrappedReceiver(params WrappedReceiverParams) *WrappedReceiver + func (r *WrappedReceiver) AddOnReady(f func()) + func (r *WrappedReceiver) Codecs() []webrtc.RTPCodecParameters + func (r *WrappedReceiver) DeleteDownTrack(participantID livekit.ParticipantID) + func (r *WrappedReceiver) DetermineReceiver(codec webrtc.RTPCodecCapability) (isAvailable bool, needsPublish bool) + func (r *WrappedReceiver) StreamID() string + func (r *WrappedReceiver) TrackID() livekit.TrackID + type WrappedReceiverParams struct + DisableRed bool + IsEncrypted bool + Logger logger.Logger + Receivers []*simulcastReceiver + StreamId string + TrackID livekit.TrackID + UpstreamCodecs []webrtc.RTPCodecParameters