Documentation ¶
Index ¶
- Constants
- Variables
- func BroadcastDataPacketForRoom(r types.Room, source types.LocalParticipant, kind livekit.DataPacket_Kind, ...)
- func FromProtoSessionDescription(sd *livekit.SessionDescription) webrtc.SessionDescription
- func FromProtoTrickle(trickle *livekit.TrickleRequest) (webrtc.ICECandidateInit, error)
- func HandleParticipantSignal(room types.Room, participant types.LocalParticipant, ...) error
- func IsCloseNotifySkippable(closeReason types.ParticipantCloseReason) bool
- func IsCodecEnabled(codecs []*livekit.Codec, cap webrtc.RTPCodecCapability) bool
- func IsEOF(err error) bool
- func LoggerWithCodecMime(l logger.Logger, mime string) 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 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 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 ToProtoSessionDescription(sd webrtc.SessionDescription) *livekit.SessionDescription
- func ToProtoTrackKind(kind webrtc.RTPCodecType) livekit.TrackType
- func ToProtoTrickle(candidateInit webrtc.ICECandidateInit) *livekit.TrickleRequest
- func UnpackDataTrackLabel(packed string) (participantID livekit.ParticipantID, trackID livekit.TrackID, label string)
- func UnpackStreamID(packed string) (participantID livekit.ParticipantID, trackID livekit.TrackID)
- type AnyTransportHandler
- type ClientInfo
- func (c ClientInfo) CanHandleReconnectResponse() bool
- func (c ClientInfo) ComplyWithCodecOrderInSDPAnswer() bool
- func (c ClientInfo) FireTrackByRTPPacket() bool
- func (c ClientInfo) SupportPrflxOverRelay() bool
- func (c ClientInfo) SupportsAudioRED() bool
- func (c ClientInfo) SupportsChangeRTPSenderEncodingActive() bool
- func (c ClientInfo) SupportsICETCP() bool
- type DirectionConfig
- type DummyReceiver
- func (d *DummyReceiver) AddDownTrack(track sfu.TrackSender) error
- func (d *DummyReceiver) Codec() webrtc.RTPCodecParameters
- func (d *DummyReceiver) DebugInfo() map[string]interface{}
- func (d *DummyReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID)
- func (d *DummyReceiver) GetAudioLevel() (float64, bool)
- 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) ReadRTP(buf []byte, layer uint8, sn uint16) (int, error)
- func (d *DummyReceiver) Receiver() sfu.TrackReceiver
- func (d *DummyReceiver) SendPLI(layer int32, force bool)
- func (d *DummyReceiver) SetMaxExpectedSpatialLayer(layer int32)
- func (d *DummyReceiver) SetUpTrackPaused(paused bool)
- 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)
- type DynacastManager
- func (d *DynacastManager) AddCodec(mime string)
- func (d *DynacastManager) Close()
- func (d *DynacastManager) ForceQuality(quality livekit.VideoQuality)
- func (d *DynacastManager) ForceUpdate()
- func (d *DynacastManager) NotifySubscriberMaxQuality(subscriberID livekit.ParticipantID, mime string, quality livekit.VideoQuality)
- func (d *DynacastManager) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, qualities []types.SubscribedCodecQuality)
- func (d *DynacastManager) OnSubscribedMaxQualityChange(f func(subscribedQualities []*livekit.SubscribedCodec, ...))
- func (d *DynacastManager) Restart()
- type DynacastManagerParams
- type DynacastQuality
- func (d *DynacastQuality) NotifySubscriberMaxQuality(subscriberID livekit.ParticipantID, quality livekit.VideoQuality)
- func (d *DynacastQuality) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, quality livekit.VideoQuality)
- func (d *DynacastQuality) OnSubscribedMaxQualityChange(f func(maxSubscribedQuality livekit.VideoQuality))
- func (d *DynacastQuality) Restart()
- func (d *DynacastQuality) Start()
- func (d *DynacastQuality) Stop()
- type DynacastQualityParams
- type EgressLauncher
- type MediaLossProxy
- type MediaLossProxyParams
- type MediaTrack
- func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.TrackRemote, mid string) bool
- func (t *MediaTrack) Close(willBeResumed bool)
- func (t *MediaTrack) GetConnectionScoreAndQuality() (float32, livekit.ConnectionQuality)
- func (t *MediaTrack) HasPendingCodec() bool
- func (t *MediaTrack) HasSdpCid(cid string) bool
- func (t *MediaTrack) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, qualities []types.SubscribedCodecQuality)
- func (t *MediaTrack) OnSubscribedMaxQualityChange(f func(trackID livekit.TrackID, trackInfo *livekit.TrackInfo, ...) error)
- func (t *MediaTrack) Restart()
- func (t *MediaTrack) SetMuted(muted bool)
- func (t *MediaTrack) SetRTT(rtt uint32)
- func (t *MediaTrack) SignalCid() string
- func (t *MediaTrack) ToProto() *livekit.TrackInfo
- func (t *MediaTrack) UpdateCodecCid(codecs []*livekit.SimulcastCodec)
- type MediaTrackParams
- type MediaTrackReceiver
- func (t *MediaTrackReceiver) AddOnClose(f func())
- func (t *MediaTrackReceiver) AddSubscriber(sub types.LocalParticipant) (types.SubscribedTrack, error)
- func (t *MediaTrackReceiver) ClearAllReceivers(willBeResumed bool)
- func (t *MediaTrackReceiver) ClearReceiver(mime string, willBeResumed bool)
- func (t *MediaTrackReceiver) Close()
- func (t *MediaTrackReceiver) DebugInfo() map[string]interface{}
- func (t *MediaTrackReceiver) GetAudioLevel() (float64, bool)
- func (t *MediaTrackReceiver) GetQualityForDimension(width, height uint32) livekit.VideoQuality
- func (t *MediaTrackReceiver) GetTemporalLayerForSpatialFps(spatial int32, fps uint32, mime string) int32
- func (t *MediaTrackReceiver) GetTrackStats() *livekit.RTPStats
- func (t *MediaTrackReceiver) ID() livekit.TrackID
- func (t *MediaTrackReceiver) IsEncrypted() bool
- func (t *MediaTrackReceiver) IsMuted() bool
- func (t *MediaTrackReceiver) IsOpen() bool
- func (t *MediaTrackReceiver) IsSimulcast() bool
- func (t *MediaTrackReceiver) Kind() livekit.TrackType
- func (t *MediaTrackReceiver) Name() string
- func (t *MediaTrackReceiver) NotifyMaxLayerChange(maxLayer int32)
- func (t *MediaTrackReceiver) OnMediaLossFeedback(f func(dt *sfu.DownTrack, rr *rtcp.ReceiverReport))
- func (t *MediaTrackReceiver) OnSetupReceiver(f func(mime string))
- 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 string) sfu.TrackReceiver
- func (t *MediaTrackReceiver) Receivers() []sfu.TrackReceiver
- func (t *MediaTrackReceiver) RemoveSubscriber(subscriberID livekit.ParticipantID, willBeResumed bool)
- func (t *MediaTrackReceiver) Restart()
- func (t *MediaTrackReceiver) RevokeDisallowedSubscribers(allowedSubscriberIdentities []livekit.ParticipantIdentity) []livekit.ParticipantIdentity
- func (t *MediaTrackReceiver) SetClosing()
- func (t *MediaTrackReceiver) SetLayerSsrc(mime string, rid string, ssrc uint32)
- func (t *MediaTrackReceiver) SetMuted(muted bool)
- func (t *MediaTrackReceiver) SetPotentialCodecs(codecs []webrtc.RTPCodecParameters, ...)
- func (t *MediaTrackReceiver) SetRTT(rtt uint32)
- func (t *MediaTrackReceiver) SetSimulcast(simulcast bool)
- 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) UpdateCodecCid(codecs []*livekit.SimulcastCodec)
- func (t *MediaTrackReceiver) UpdateTrackInfo(ti *livekit.TrackInfo)
- func (t *MediaTrackReceiver) UpdateVideoLayers(layers []*livekit.VideoLayer)
- type MediaTrackReceiverParams
- type MediaTrackSubscriptions
- func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, wr *WrappedReceiver) (types.SubscribedTrack, error)
- func (t *MediaTrackSubscriptions) DebugInfo() []map[string]interface{}
- func (t *MediaTrackSubscriptions) GetAllSubscribers() []livekit.ParticipantID
- func (t *MediaTrackSubscriptions) GetAllSubscribersForMime(mime string) []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) OnSubscriberMaxQualityChange(...)
- func (t *MediaTrackSubscriptions) RemoveSubscriber(subscriberID livekit.ParticipantID, willBeResumed bool) error
- func (t *MediaTrackSubscriptions) ResyncAllSubscribers()
- func (t *MediaTrackSubscriptions) SetMuted(muted bool)
- func (t *MediaTrackSubscriptions) UpdateVideoLayers()
- type MediaTrackSubscriptionsParams
- type PCTransport
- 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) 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) GetICEConnectionDetails() *types.ICEConnectionDetails
- 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) HandleRemoteDescription(sd webrtc.SessionDescription)
- 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) RemoveTrack(sender *webrtc.RTPSender) error
- func (t *PCTransport) RemoveTrackFromStreamAllocator(subTrack types.SubscribedTrack)
- func (t *PCTransport) ResetShortConnOnICERestart()
- func (t *PCTransport) SendDataPacket(kind livekit.DataPacket_Kind, encoded []byte) error
- func (t *PCTransport) SetAllowPauseOfStreamAllocator(allowPause bool)
- func (t *PCTransport) SetChannelCapacityOfStreamAllocator(channelCapacity int64)
- func (t *PCTransport) SetPreferTCP(preferTCP bool)
- func (t *PCTransport) SetPreviousSdp(offer, answer *webrtc.SessionDescription)
- func (t *PCTransport) SetSignalingRTT(rtt uint32)
- func (t *PCTransport) WriteRTCP(pkts []rtcp.Packet) error
- type ParticipantImpl
- func (p *ParticipantImpl) AddTrack(req *livekit.AddTrackRequest)
- func (p *ParticipantImpl) CacheDownTrack(trackID livekit.TrackID, rtpTransceiver *webrtc.RTPTransceiver, ...)
- 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) ClaimGrants() *auth.ClaimGrants
- 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]interface{}
- func (p *ParticipantImpl) GetAdaptiveStream() bool
- 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) GetLogger() logger.Logger
- func (p *ParticipantImpl) GetPacer() pacer.Pacer
- func (p *ParticipantImpl) GetPendingTrack(trackID livekit.TrackID) *livekit.TrackInfo
- func (p *ParticipantImpl) GetPlayoutDelayConfig() *livekit.PlayoutDelay
- func (p *ParticipantImpl) GetTrailer() []byte
- func (p *ParticipantImpl) HandleAnswer(answer webrtc.SessionDescription)
- func (p *ParticipantImpl) HandleOffer(offer webrtc.SessionDescription)
- func (p *ParticipantImpl) HandleReconnectAndSendResponse(reconnectReason livekit.ReconnectReason, ...) error
- func (p *ParticipantImpl) HandleSignalSourceClose()
- 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) 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) IssueFullReconnect(reason types.ParticipantCloseReason)
- func (p *ParticipantImpl) Kind() livekit.ParticipantInfo_Kind
- func (p *ParticipantImpl) MaybeStartMigration(force bool, onStart func()) bool
- func (p *ParticipantImpl) MigrateState() types.MigrateState
- func (p *ParticipantImpl) Negotiate(force bool)
- func (p *ParticipantImpl) NotifyMigration()
- func (p *ParticipantImpl) OnClaimsChanged(callback func(types.LocalParticipant))
- func (p *ParticipantImpl) OnClose(callback func(types.LocalParticipant))
- func (p *ParticipantImpl) OnDataPacket(...)
- func (p *ParticipantImpl) OnICEConfigChanged(f func(participant types.LocalParticipant, iceConfig *livekit.ICEConfig))
- func (p *ParticipantImpl) OnMigrateStateChange(callback func(p types.LocalParticipant, state types.MigrateState))
- func (p *ParticipantImpl) OnParticipantUpdate(callback func(types.LocalParticipant))
- func (p *ParticipantImpl) OnStateChange(callback func(p types.LocalParticipant, state livekit.ParticipantInfo_State))
- func (p *ParticipantImpl) OnTrackPublished(callback func(types.LocalParticipant, types.MediaTrack))
- func (p *ParticipantImpl) OnTrackUnpublished(callback func(types.LocalParticipant, types.MediaTrack))
- func (p *ParticipantImpl) OnTrackUpdated(callback func(types.LocalParticipant, types.MediaTrack))
- func (p *ParticipantImpl) ProtocolVersion() types.ProtocolVersion
- func (p *ParticipantImpl) SendConnectionQualityUpdate(update *livekit.ConnectionQualityUpdate) error
- func (p *ParticipantImpl) SendDataPacket(kind livekit.DataPacket_Kind, encoded []byte) 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) SendRoomUpdate(room *livekit.Room) error
- func (p *ParticipantImpl) SendSpeakerUpdate(speakers []*livekit.SpeakerInfo, force bool) error
- 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) SetResponseSink(sink routing.MessageSink)
- func (p *ParticipantImpl) SetTrackMuted(trackID livekit.TrackID, muted bool, fromAdmin bool) *livekit.TrackInfo
- func (p *ParticipantImpl) State() livekit.ParticipantInfo_State
- func (p *ParticipantImpl) SubscriptionPermissionUpdate(publisherID livekit.ParticipantID, trackID livekit.TrackID, allowed bool)
- func (p *ParticipantImpl) SupportsSyncStreamID() bool
- func (p *ParticipantImpl) SupportsTransceiverReuse() bool
- func (p *ParticipantImpl) ToProto() *livekit.ParticipantInfo
- func (p *ParticipantImpl) ToProtoWithVersion() (*livekit.ParticipantInfo, utils.TimedVersion)
- func (p *ParticipantImpl) UncacheDownTrack(rtpTransceiver *webrtc.RTPTransceiver)
- func (p *ParticipantImpl) UpdateMediaLoss(nodeID livekit.NodeID, trackID livekit.TrackID, fractionalLoss uint32) error
- func (p *ParticipantImpl) UpdateMediaRTT(rtt uint32)
- func (p *ParticipantImpl) UpdateSubscribedQuality(nodeID livekit.NodeID, trackID livekit.TrackID, ...) error
- func (p *ParticipantImpl) VerifySubscribeParticipantInfo(pID livekit.ParticipantID, version uint32)
- type ParticipantOptions
- type ParticipantParams
- type ParticipantTrafficLoad
- type ParticipantTrafficLoadParams
- type PrimaryTransportHandler
- type PublisherTransportHandler
- func (h PublisherTransportHandler) OnAnswer(sd webrtc.SessionDescription) error
- func (h PublisherTransportHandler) OnDataPacket(kind livekit.DataPacket_Kind, data []byte)
- func (h PublisherTransportHandler) OnInitialConnected()
- func (h PublisherTransportHandler) OnTrack(track *webrtc.TrackRemote, rtpReceiver *webrtc.RTPReceiver)
- type RTCPFeedbackConfig
- type RTPHeaderExtensionConfig
- type ReceiverConfig
- type Room
- func (r *Room) Close(reason types.ParticipantCloseReason)
- func (r *Room) CloseIfEmpty()
- func (r *Room) DebugInfo() map[string]interface{}
- func (r *Room) FirstJoinedAt() int64
- func (r *Room) GetActiveSpeakers() []*livekit.SpeakerInfo
- func (r *Room) GetBufferFactory() *buffer.Factory
- 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) Hold() bool
- func (r *Room) ID() livekit.RoomID
- func (r *Room) Internal() *livekit.RoomInternal
- func (r *Room) IsClosed() bool
- func (r *Room) Join(participant types.LocalParticipant, requestSource routing.MessageSource, ...) error
- func (r *Room) LastLeftAt() int64
- func (r *Room) Name() livekit.RoomName
- func (r *Room) OnClose(f func())
- func (r *Room) OnParticipantChanged(f func(participant types.LocalParticipant))
- func (r *Room) OnRoomUpdated(f func())
- 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) ResolveMediaTrackForSubscriber(subIdentity livekit.ParticipantIdentity, 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) SimulateScenario(participant types.LocalParticipant, simulateScenario *livekit.SimulateScenario) error
- func (r *Room) SyncState(participant types.LocalParticipant, state *livekit.SyncState) error
- func (r *Room) ToProto() *livekit.Room
- func (r *Room) Trailer() []byte
- func (r *Room) UpdateParticipantMetadata(participant types.LocalParticipant, name string, metadata string)
- func (r *Room) UpdateSubscriptionPermission(participant types.LocalParticipant, ...) error
- func (r *Room) UpdateSubscriptions(participant types.LocalParticipant, trackIDs []livekit.TrackID, ...)
- func (r *Room) UpdateVideoLayers(participant types.Participant, updateVideoLayers *livekit.UpdateVideoLayers) error
- type RoomTrackManager
- func (r *RoomTrackManager) AddTrack(track types.MediaTrack, publisherIdentity livekit.ParticipantIdentity, ...)
- 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) RemoveTrack(track types.MediaTrack)
- type SimulcastTrackInfo
- type SubscribedTrack
- func (t *SubscribedTrack) AddOnBind(f func(error))
- func (t *SubscribedTrack) Bound(err error)
- func (t *SubscribedTrack) Close(willBeResumed 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) OnClose(f func(bool))
- 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
- type SubscriberTransportHandler
- type SubscriptionManager
- func (m *SubscriptionManager) Close(willBeResumed 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) OnSubscribeStatusChanged(fn func(publisherID livekit.ParticipantID, subscribed bool))
- func (m *SubscriptionManager) ReconcileAll()
- func (m *SubscriptionManager) SubscribeToTrack(trackID livekit.TrackID)
- func (m *SubscriptionManager) UnsubscribeFromTrack(trackID livekit.TrackID)
- func (m *SubscriptionManager) UpdateSubscribedTrackSettings(trackID livekit.TrackID, settings *livekit.UpdateTrackSettings)
- func (m *SubscriptionManager) WaitUntilSubscribed(timeout time.Duration) error
- type SubscriptionManagerParams
- type TrackInfo
- type TransportManager
- func (t *TransportManager) AddICECandidate(candidate webrtc.ICECandidateInit, target livekit.SignalTarget)
- func (t *TransportManager) AddSubscribedTrack(subTrack types.SubscribedTrack)
- func (t *TransportManager) AddTrackToSubscriber(trackLocal webrtc.TrackLocal, params types.AddTrackParams) (*webrtc.RTPSender, *webrtc.RTPTransceiver, error)
- func (t *TransportManager) AddTransceiverFromTrackToSubscriber(trackLocal webrtc.TrackLocal, params types.AddTrackParams) (*webrtc.RTPSender, *webrtc.RTPTransceiver, error)
- func (t *TransportManager) Close()
- func (t *TransportManager) GetICEConnectionDetails() []*types.ICEConnectionDetails
- func (t *TransportManager) GetPublisherMid(rtpReceiver *webrtc.RTPReceiver) string
- func (t *TransportManager) GetPublisherRTPReceiver(mid string) *webrtc.RTPReceiver
- func (t *TransportManager) GetSubscriberPacer() pacer.Pacer
- func (t *TransportManager) GetUnmatchMediaForOffer(offer webrtc.SessionDescription, mediaType string) (parsed *sdp.SessionDescription, unmatched []*sdp.MediaDescription, err error)
- func (t *TransportManager) HandleAnswer(answer webrtc.SessionDescription)
- func (t *TransportManager) HandleClientReconnect(reason livekit.ReconnectReason)
- func (t *TransportManager) HandleOffer(offer webrtc.SessionDescription, shouldPend bool)
- 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) 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) RemoveSubscribedTrack(subTrack types.SubscribedTrack)
- func (t *TransportManager) RemoveTrackFromSubscriber(sender *webrtc.RTPSender) error
- func (t *TransportManager) SendDataPacket(kind livekit.DataPacket_Kind, encoded []byte) error
- func (t *TransportManager) SetICEConfig(iceConfig *livekit.ICEConfig)
- func (t *TransportManager) SetMigrateInfo(previousOffer, previousAnswer *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
- type TransportManagerPublisherTransportHandler
- type TransportManagerTransportHandler
- type TransportParams
- type UnhandleSimulcastInterceptor
- type UnhandleSimulcastInterceptorFactory
- type UnhandleSimulcastOption
- type UpTrackManager
- func (u *UpTrackManager) AddPublishedTrack(track types.MediaTrack)
- func (u *UpTrackManager) Close(willBeResumed bool)
- func (u *UpTrackManager) DebugInfo() map[string]interface{}
- 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, willBeResumed bool, shouldClose bool)
- func (u *UpTrackManager) SetPublishedTrackMuted(trackID livekit.TrackID, muted bool) types.MediaTrack
- func (u *UpTrackManager) SubscriptionPermission() (*livekit.SubscriptionPermission, utils.TimedVersion)
- func (u *UpTrackManager) ToProto() []*livekit.TrackInfo
- func (u *UpTrackManager) UpdateSubscriptionPermission(subscriptionPermission *livekit.SubscriptionPermission, ...) error
- func (u *UpTrackManager) UpdateVideoLayers(updateVideoLayers *livekit.UpdateVideoLayers) error
- type UpTrackManagerParams
- type WebRTCConfig
- type WrappedReceiver
- func (r *WrappedReceiver) Codecs() []webrtc.RTPCodecParameters
- func (r *WrappedReceiver) DeleteDownTrack(participantID livekit.ParticipantID)
- func (r *WrappedReceiver) DetermineReceiver(codec webrtc.RTPCodecCapability)
- func (r *WrappedReceiver) StreamID() string
- func (r *WrappedReceiver) TrackID() livekit.TrackID
- type WrappedReceiverParams
Constants ¶
const ( PingIntervalSeconds = 5 PingTimeoutSeconds = 15 )
const ( LossyDataChannel = "_lossy" ReliableDataChannel = "_reliable" )
const (
AudioLevelQuantization = 8 // ideally power of 2 to minimize float decimal
)
Variables ¶
var ( ErrRoomClosed = errors.New("room has already closed") ErrPermissionDenied = errors.New("no permissions to access the room") ErrMaxParticipantsExceeded = errors.New("room has exceeded its max participants") ErrLimitExceeded = errors.New("node has exceeded its configured limit") ErrAlreadyJoined = errors.New("a participant with the same identity is already in the room") ErrDataChannelBufferFull = errors.New("data channel buffer is full") ErrTransportFailure = errors.New("transport failure") ErrEmptyIdentity = errors.New("participant identity cannot be empty") ErrEmptyParticipantID = errors.New("participant ID cannot be empty") ErrMissingGrants = errors.New("VideoGrant is missing") ErrInternalError = errors.New("internal error") // Track subscription related ErrNoTrackPermission = errors.New("participant is not allowed to subscribe to this track") ErrNoSubscribePermission = errors.New("participant is not given permission to subscribe to tracks") ErrTrackNotFound = errors.New("track cannot be found") ErrTrackNotAttached = errors.New("track is not yet attached") ErrTrackNotBound = errors.New("track not bound") ErrSubscriptionLimitExceeded = errors.New("participant has exceeded its subscription limit") )
var ( ErrNotOpen = errors.New("track is not open") ErrNoReceiver = errors.New("cannot subscribe without a receiver in place") )
var ( ErrIceRestartWithoutLocalSDP = errors.New("ICE restart without local SDP settled") ErrIceRestartOnClosedPeerConnection = errors.New("ICE restart on closed peer connection") ErrNoTransceiver = errors.New("no transceiver") ErrNoSender = errors.New("no sender") ErrMidNotFound = errors.New("mid not found") )
var (
ErrSubscriptionPermissionNeedsId = errors.New("either participant identity or SID needed")
)
Functions ¶
func BroadcastDataPacketForRoom ¶
func BroadcastDataPacketForRoom(r types.Room, source types.LocalParticipant, kind livekit.DataPacket_Kind, dp *livekit.DataPacket, logger logger.Logger)
func FromProtoSessionDescription ¶
func FromProtoSessionDescription(sd *livekit.SessionDescription) webrtc.SessionDescription
func FromProtoTrickle ¶
func FromProtoTrickle(trickle *livekit.TrickleRequest) (webrtc.ICECandidateInit, error)
func HandleParticipantSignal ¶
func HandleParticipantSignal(room types.Room, participant types.LocalParticipant, req *livekit.SignalRequest, pLogger logger.Logger) error
func IsCloseNotifySkippable ¶
func IsCloseNotifySkippable(closeReason types.ParticipantCloseReason) bool
func IsCodecEnabled ¶
func LoggerWithPCTarget ¶
func LoggerWithParticipant ¶
func LoggerWithParticipant(l logger.Logger, identity livekit.ParticipantIdentity, sid livekit.ParticipantID, isRemote bool) logger.Logger
logger helpers
func LoggerWithRoom ¶
func LoggerWithTrack ¶
func NewMockParticipant ¶
func NewMockParticipant(identity livekit.ParticipantIdentity, protocol types.ProtocolVersion, hidden bool, publisher bool) *typesfakes.FakeLocalParticipant
func NewMockTrack ¶
func NewMockTrack(kind livekit.TrackType, name string) *typesfakes.FakeMediaTrack
func PackDataTrackLabel ¶
func PackStreamID ¶
func PackStreamID(participantID livekit.ParticipantID, trackID livekit.TrackID) string
func PackSyncStreamID ¶
func PackSyncStreamID(participantID livekit.ParticipantID, stream string) string
func StartParticipantEgress ¶
func StartParticipantEgress( ctx context.Context, launcher EgressLauncher, ts telemetry.TelemetryService, opts *livekit.AutoParticipantEgress, identity livekit.ParticipantIdentity, roomName livekit.RoomName, roomID livekit.RoomID, ) error
func StartTrackEgress ¶
func StartTrackEgress( ctx context.Context, launcher EgressLauncher, ts telemetry.TelemetryService, opts *livekit.AutoTrackEgress, track types.MediaTrack, roomName livekit.RoomName, roomID livekit.RoomID, ) error
func StreamFromTrackSource ¶
func StreamFromTrackSource(source livekit.TrackSource) string
func ToProtoSessionDescription ¶
func ToProtoSessionDescription(sd webrtc.SessionDescription) *livekit.SessionDescription
func ToProtoTrackKind ¶
func ToProtoTrickle ¶
func ToProtoTrickle(candidateInit webrtc.ICECandidateInit) *livekit.TrickleRequest
func UnpackDataTrackLabel ¶
func UnpackStreamID ¶
func UnpackStreamID(packed string) (participantID livekit.ParticipantID, trackID livekit.TrackID)
Types ¶
type AnyTransportHandler ¶
type AnyTransportHandler struct { transport.UnimplementedHandler // contains filtered or unexported fields }
func (AnyTransportHandler) OnFailed ¶
func (h AnyTransportHandler) OnFailed(isShortLived bool)
func (AnyTransportHandler) OnICECandidate ¶
func (h AnyTransportHandler) OnICECandidate(c *webrtc.ICECandidate, target livekit.SignalTarget) error
func (AnyTransportHandler) OnNegotiationFailed ¶
func (h AnyTransportHandler) OnNegotiationFailed()
type ClientInfo ¶
type ClientInfo struct {
*livekit.ClientInfo
}
func (ClientInfo) CanHandleReconnectResponse ¶
func (c ClientInfo) CanHandleReconnectResponse() bool
func (ClientInfo) ComplyWithCodecOrderInSDPAnswer ¶
func (c ClientInfo) ComplyWithCodecOrderInSDPAnswer() bool
func (ClientInfo) FireTrackByRTPPacket ¶
func (c ClientInfo) FireTrackByRTPPacket() bool
GoSDK(pion) relies on rtp packets to fire ontrack event, browsers and native (libwebrtc) rely on sdp
func (ClientInfo) SupportPrflxOverRelay ¶
func (c ClientInfo) SupportPrflxOverRelay() bool
func (ClientInfo) SupportsAudioRED ¶
func (c ClientInfo) SupportsAudioRED() bool
func (ClientInfo) SupportsChangeRTPSenderEncodingActive ¶
func (c ClientInfo) SupportsChangeRTPSenderEncodingActive() bool
func (ClientInfo) SupportsICETCP ¶
func (c ClientInfo) SupportsICETCP() bool
type DirectionConfig ¶
type DirectionConfig struct { RTPHeaderExtension RTPHeaderExtensionConfig RTCPFeedback RTCPFeedbackConfig StrictACKs bool }
type DummyReceiver ¶
type DummyReceiver struct {
// contains filtered or unexported fields
}
func NewDummyReceiver ¶
func NewDummyReceiver(trackID livekit.TrackID, streamId string, codec webrtc.RTPCodecParameters, headerExtensions []webrtc.RTPHeaderExtensionParameter) *DummyReceiver
func (*DummyReceiver) AddDownTrack ¶
func (d *DummyReceiver) AddDownTrack(track sfu.TrackSender) error
func (*DummyReceiver) Codec ¶
func (d *DummyReceiver) Codec() webrtc.RTPCodecParameters
func (*DummyReceiver) DebugInfo ¶
func (d *DummyReceiver) DebugInfo() map[string]interface{}
func (*DummyReceiver) DeleteDownTrack ¶
func (d *DummyReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID)
func (*DummyReceiver) GetAudioLevel ¶
func (d *DummyReceiver) GetAudioLevel() (float64, bool)
func (*DummyReceiver) GetLayeredBitrate ¶
func (d *DummyReceiver) GetLayeredBitrate() ([]int32, sfu.Bitrates)
func (*DummyReceiver) GetPrimaryReceiverForRed ¶
func (d *DummyReceiver) GetPrimaryReceiverForRed() sfu.TrackReceiver
func (*DummyReceiver) GetRedReceiver ¶
func (d *DummyReceiver) GetRedReceiver() sfu.TrackReceiver
func (*DummyReceiver) GetTemporalLayerFpsForSpatial ¶
func (d *DummyReceiver) GetTemporalLayerFpsForSpatial(spatial int32) []float32
func (*DummyReceiver) GetTrackStats ¶
func (d *DummyReceiver) GetTrackStats() *livekit.RTPStats
func (*DummyReceiver) HeaderExtensions ¶
func (d *DummyReceiver) HeaderExtensions() []webrtc.RTPHeaderExtensionParameter
func (*DummyReceiver) IsClosed ¶
func (d *DummyReceiver) IsClosed() bool
func (*DummyReceiver) Receiver ¶
func (d *DummyReceiver) Receiver() sfu.TrackReceiver
func (*DummyReceiver) SendPLI ¶
func (d *DummyReceiver) SendPLI(layer int32, force bool)
func (*DummyReceiver) SetMaxExpectedSpatialLayer ¶
func (d *DummyReceiver) SetMaxExpectedSpatialLayer(layer int32)
func (*DummyReceiver) SetUpTrackPaused ¶
func (d *DummyReceiver) SetUpTrackPaused(paused bool)
func (*DummyReceiver) StreamID ¶
func (d *DummyReceiver) StreamID() string
func (*DummyReceiver) TrackID ¶
func (d *DummyReceiver) TrackID() livekit.TrackID
func (*DummyReceiver) TrackInfo ¶
func (d *DummyReceiver) TrackInfo() *livekit.TrackInfo
func (*DummyReceiver) UpdateTrackInfo ¶
func (d *DummyReceiver) UpdateTrackInfo(ti *livekit.TrackInfo)
func (*DummyReceiver) Upgrade ¶
func (d *DummyReceiver) Upgrade(receiver sfu.TrackReceiver)
type DynacastManager ¶
type DynacastManager struct {
// contains filtered or unexported fields
}
func NewDynacastManager ¶
func NewDynacastManager(params DynacastManagerParams) *DynacastManager
func (*DynacastManager) AddCodec ¶
func (d *DynacastManager) AddCodec(mime string)
func (*DynacastManager) Close ¶
func (d *DynacastManager) Close()
func (*DynacastManager) ForceQuality ¶
func (d *DynacastManager) ForceQuality(quality livekit.VideoQuality)
It is possible for tracks to be in pending close state. When track is waiting to be closed, a node is not streaming a track. This can be used to force an update announcing that subscribed quality is OFF, i.e. indicating not pulling track any more.
func (*DynacastManager) ForceUpdate ¶
func (d *DynacastManager) ForceUpdate()
THere are situations like track unmute or streaming from a different node where subscribed quality needs to sent to the provider immediately. This bypasses any debouncing and forces a subscribed quality update with immediate effect.
func (*DynacastManager) NotifySubscriberMaxQuality ¶
func (d *DynacastManager) NotifySubscriberMaxQuality(subscriberID livekit.ParticipantID, mime string, quality livekit.VideoQuality)
func (*DynacastManager) NotifySubscriberNodeMaxQuality ¶
func (d *DynacastManager) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, qualities []types.SubscribedCodecQuality)
func (*DynacastManager) OnSubscribedMaxQualityChange ¶
func (d *DynacastManager) OnSubscribedMaxQualityChange(f func(subscribedQualities []*livekit.SubscribedCodec, maxSubscribedQualities []types.SubscribedCodecQuality))
func (*DynacastManager) Restart ¶
func (d *DynacastManager) Restart()
type DynacastManagerParams ¶
type DynacastQuality ¶
type DynacastQuality struct {
// contains filtered or unexported fields
}
DynacastQuality manages max subscribed quality of a single receiver of a media track
func NewDynacastQuality ¶
func NewDynacastQuality(params DynacastQualityParams) *DynacastQuality
func (*DynacastQuality) NotifySubscriberMaxQuality ¶
func (d *DynacastQuality) NotifySubscriberMaxQuality(subscriberID livekit.ParticipantID, quality livekit.VideoQuality)
func (*DynacastQuality) NotifySubscriberNodeMaxQuality ¶
func (d *DynacastQuality) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, quality livekit.VideoQuality)
func (*DynacastQuality) OnSubscribedMaxQualityChange ¶
func (d *DynacastQuality) OnSubscribedMaxQualityChange(f func(maxSubscribedQuality livekit.VideoQuality))
func (*DynacastQuality) Restart ¶
func (d *DynacastQuality) Restart()
func (*DynacastQuality) Start ¶
func (d *DynacastQuality) Start()
func (*DynacastQuality) Stop ¶
func (d *DynacastQuality) Stop()
type DynacastQualityParams ¶
type EgressLauncher ¶
type EgressLauncher interface { StartEgress(context.Context, *rpc.StartEgressRequest) (*livekit.EgressInfo, error) StartEgressWithClusterId(ctx context.Context, clusterId string, req *rpc.StartEgressRequest) (*livekit.EgressInfo, error) }
type MediaLossProxy ¶
type MediaLossProxy struct {
// contains filtered or unexported fields
}
func NewMediaLossProxy ¶
func NewMediaLossProxy(params MediaLossProxyParams) *MediaLossProxy
func (*MediaLossProxy) HandleMaxLossFeedback ¶
func (m *MediaLossProxy) HandleMaxLossFeedback(_ *sfu.DownTrack, report *rtcp.ReceiverReport)
func (*MediaLossProxy) NotifySubscriberNodeMediaLoss ¶
func (m *MediaLossProxy) NotifySubscriberNodeMediaLoss(_nodeID livekit.NodeID, fractionalLoss uint8)
func (*MediaLossProxy) OnMediaLossUpdate ¶
func (m *MediaLossProxy) OnMediaLossUpdate(f func(fractionalLoss uint8))
type MediaLossProxyParams ¶
type MediaTrack ¶
type MediaTrack struct { *MediaTrackReceiver *MediaLossProxy // contains filtered or unexported fields }
MediaTrack represents a WebRTC track that needs to be forwarded Implements MediaTrack and PublishedTrack interface
func NewMediaTrack ¶
func NewMediaTrack(params MediaTrackParams, ti *livekit.TrackInfo) *MediaTrack
func (*MediaTrack) AddReceiver ¶
func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.TrackRemote, mid string) bool
AddReceiver adds a new RTP receiver to the track, returns true when receiver represents a new codec
func (*MediaTrack) Close ¶
func (t *MediaTrack) Close(willBeResumed bool)
func (*MediaTrack) GetConnectionScoreAndQuality ¶
func (t *MediaTrack) GetConnectionScoreAndQuality() (float32, livekit.ConnectionQuality)
func (*MediaTrack) HasPendingCodec ¶
func (t *MediaTrack) HasPendingCodec() bool
func (*MediaTrack) HasSdpCid ¶
func (t *MediaTrack) HasSdpCid(cid string) bool
func (*MediaTrack) NotifySubscriberNodeMaxQuality ¶
func (t *MediaTrack) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, qualities []types.SubscribedCodecQuality)
func (*MediaTrack) OnSubscribedMaxQualityChange ¶
func (t *MediaTrack) OnSubscribedMaxQualityChange( f func( trackID livekit.TrackID, trackInfo *livekit.TrackInfo, subscribedQualities []*livekit.SubscribedCodec, maxSubscribedQualities []types.SubscribedCodecQuality, ) error, )
func (*MediaTrack) Restart ¶
func (t *MediaTrack) Restart()
func (*MediaTrack) SetMuted ¶
func (t *MediaTrack) SetMuted(muted bool)
func (*MediaTrack) SetRTT ¶
func (t *MediaTrack) SetRTT(rtt uint32)
func (*MediaTrack) SignalCid ¶
func (t *MediaTrack) SignalCid() string
func (*MediaTrack) ToProto ¶
func (t *MediaTrack) ToProto() *livekit.TrackInfo
func (*MediaTrack) UpdateCodecCid ¶
func (t *MediaTrack) UpdateCodecCid(codecs []*livekit.SimulcastCodec)
type MediaTrackParams ¶
type MediaTrackParams struct { SignalCid string SdpCid string ParticipantID livekit.ParticipantID ParticipantIdentity livekit.ParticipantIdentity ParticipantVersion uint32 BufferFactory *buffer.Factory ReceiverConfig ReceiverConfig SubscriberConfig DirectionConfig PLIThrottleConfig config.PLIThrottleConfig AudioConfig config.AudioConfig VideoConfig config.VideoConfig Telemetry telemetry.TelemetryService Logger logger.Logger SimTracks map[uint32]SimulcastTrackInfo OnRTCP func([]rtcp.Packet) }
type MediaTrackReceiver ¶
type MediaTrackReceiver struct { *MediaTrackSubscriptions // contains filtered or unexported fields }
func NewMediaTrackReceiver ¶
func NewMediaTrackReceiver(params MediaTrackReceiverParams, ti *livekit.TrackInfo) *MediaTrackReceiver
func (*MediaTrackReceiver) AddOnClose ¶
func (t *MediaTrackReceiver) AddOnClose(f func())
func (*MediaTrackReceiver) AddSubscriber ¶
func (t *MediaTrackReceiver) AddSubscriber(sub types.LocalParticipant) (types.SubscribedTrack, error)
AddSubscriber subscribes sub to current mediaTrack
func (*MediaTrackReceiver) ClearAllReceivers ¶
func (t *MediaTrackReceiver) ClearAllReceivers(willBeResumed bool)
func (*MediaTrackReceiver) ClearReceiver ¶
func (t *MediaTrackReceiver) ClearReceiver(mime string, willBeResumed bool)
func (*MediaTrackReceiver) Close ¶
func (t *MediaTrackReceiver) Close()
func (*MediaTrackReceiver) DebugInfo ¶
func (t *MediaTrackReceiver) DebugInfo() map[string]interface{}
func (*MediaTrackReceiver) GetAudioLevel ¶
func (t *MediaTrackReceiver) GetAudioLevel() (float64, bool)
func (*MediaTrackReceiver) GetQualityForDimension ¶
func (t *MediaTrackReceiver) GetQualityForDimension(width, height uint32) livekit.VideoQuality
GetQualityForDimension finds the closest quality to use for desired dimensions affords a 20% tolerance on dimension
func (*MediaTrackReceiver) GetTemporalLayerForSpatialFps ¶
func (t *MediaTrackReceiver) GetTemporalLayerForSpatialFps(spatial int32, fps uint32, mime string) int32
func (*MediaTrackReceiver) GetTrackStats ¶
func (t *MediaTrackReceiver) GetTrackStats() *livekit.RTPStats
func (*MediaTrackReceiver) ID ¶
func (t *MediaTrackReceiver) ID() livekit.TrackID
func (*MediaTrackReceiver) IsEncrypted ¶
func (t *MediaTrackReceiver) IsEncrypted() bool
func (*MediaTrackReceiver) IsMuted ¶
func (t *MediaTrackReceiver) IsMuted() bool
func (*MediaTrackReceiver) IsOpen ¶
func (t *MediaTrackReceiver) IsOpen() bool
func (*MediaTrackReceiver) IsSimulcast ¶
func (t *MediaTrackReceiver) IsSimulcast() bool
func (*MediaTrackReceiver) Kind ¶
func (t *MediaTrackReceiver) Kind() livekit.TrackType
func (*MediaTrackReceiver) Name ¶
func (t *MediaTrackReceiver) Name() string
func (*MediaTrackReceiver) NotifyMaxLayerChange ¶
func (t *MediaTrackReceiver) NotifyMaxLayerChange(maxLayer int32)
func (*MediaTrackReceiver) OnMediaLossFeedback ¶
func (t *MediaTrackReceiver) OnMediaLossFeedback(f func(dt *sfu.DownTrack, rr *rtcp.ReceiverReport))
func (*MediaTrackReceiver) OnSetupReceiver ¶
func (t *MediaTrackReceiver) OnSetupReceiver(f func(mime string))
func (*MediaTrackReceiver) PrimaryReceiver ¶
func (t *MediaTrackReceiver) PrimaryReceiver() sfu.TrackReceiver
func (*MediaTrackReceiver) PublisherID ¶
func (t *MediaTrackReceiver) PublisherID() livekit.ParticipantID
func (*MediaTrackReceiver) PublisherIdentity ¶
func (t *MediaTrackReceiver) PublisherIdentity() livekit.ParticipantIdentity
func (*MediaTrackReceiver) PublisherVersion ¶
func (t *MediaTrackReceiver) PublisherVersion() uint32
func (*MediaTrackReceiver) Receiver ¶
func (t *MediaTrackReceiver) Receiver(mime string) sfu.TrackReceiver
func (*MediaTrackReceiver) Receivers ¶
func (t *MediaTrackReceiver) Receivers() []sfu.TrackReceiver
func (*MediaTrackReceiver) RemoveSubscriber ¶
func (t *MediaTrackReceiver) RemoveSubscriber(subscriberID livekit.ParticipantID, willBeResumed bool)
RemoveSubscriber removes participant from subscription stop all forwarders to the client
func (*MediaTrackReceiver) Restart ¶
func (t *MediaTrackReceiver) Restart()
func (*MediaTrackReceiver) RevokeDisallowedSubscribers ¶
func (t *MediaTrackReceiver) RevokeDisallowedSubscribers(allowedSubscriberIdentities []livekit.ParticipantIdentity) []livekit.ParticipantIdentity
func (*MediaTrackReceiver) SetClosing ¶
func (t *MediaTrackReceiver) SetClosing()
func (*MediaTrackReceiver) SetLayerSsrc ¶
func (t *MediaTrackReceiver) SetLayerSsrc(mime string, rid string, ssrc uint32)
func (*MediaTrackReceiver) SetMuted ¶
func (t *MediaTrackReceiver) SetMuted(muted bool)
func (*MediaTrackReceiver) SetPotentialCodecs ¶
func (t *MediaTrackReceiver) SetPotentialCodecs(codecs []webrtc.RTPCodecParameters, headers []webrtc.RTPHeaderExtensionParameter)
func (*MediaTrackReceiver) SetRTT ¶
func (t *MediaTrackReceiver) SetRTT(rtt uint32)
func (*MediaTrackReceiver) SetSimulcast ¶
func (t *MediaTrackReceiver) SetSimulcast(simulcast bool)
func (*MediaTrackReceiver) SetupReceiver ¶
func (t *MediaTrackReceiver) SetupReceiver(receiver sfu.TrackReceiver, priority int, mid string)
func (*MediaTrackReceiver) Source ¶
func (t *MediaTrackReceiver) Source() livekit.TrackSource
func (*MediaTrackReceiver) Stream ¶
func (t *MediaTrackReceiver) Stream() string
func (*MediaTrackReceiver) TrackInfo ¶
func (t *MediaTrackReceiver) TrackInfo() *livekit.TrackInfo
func (*MediaTrackReceiver) TrackInfoClone ¶
func (t *MediaTrackReceiver) TrackInfoClone() *livekit.TrackInfo
func (*MediaTrackReceiver) TryClose ¶
func (t *MediaTrackReceiver) TryClose() bool
func (*MediaTrackReceiver) UpdateCodecCid ¶
func (t *MediaTrackReceiver) UpdateCodecCid(codecs []*livekit.SimulcastCodec)
func (*MediaTrackReceiver) UpdateTrackInfo ¶
func (t *MediaTrackReceiver) UpdateTrackInfo(ti *livekit.TrackInfo)
func (*MediaTrackReceiver) UpdateVideoLayers ¶
func (t *MediaTrackReceiver) UpdateVideoLayers(layers []*livekit.VideoLayer)
type MediaTrackReceiverParams ¶
type MediaTrackReceiverParams struct { MediaTrack types.MediaTrack IsRelayed bool ParticipantID livekit.ParticipantID ParticipantIdentity livekit.ParticipantIdentity ParticipantVersion uint32 ReceiverConfig ReceiverConfig SubscriberConfig DirectionConfig AudioConfig config.AudioConfig Telemetry telemetry.TelemetryService Logger logger.Logger }
type MediaTrackSubscriptions ¶
type MediaTrackSubscriptions struct {
// contains filtered or unexported fields
}
MediaTrackSubscriptions manages subscriptions of a media track
func NewMediaTrackSubscriptions ¶
func NewMediaTrackSubscriptions(params MediaTrackSubscriptionsParams) *MediaTrackSubscriptions
func (*MediaTrackSubscriptions) AddSubscriber ¶
func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, wr *WrappedReceiver) (types.SubscribedTrack, error)
AddSubscriber subscribes sub to current mediaTrack
func (*MediaTrackSubscriptions) DebugInfo ¶
func (t *MediaTrackSubscriptions) DebugInfo() []map[string]interface{}
func (*MediaTrackSubscriptions) GetAllSubscribers ¶
func (t *MediaTrackSubscriptions) GetAllSubscribers() []livekit.ParticipantID
func (*MediaTrackSubscriptions) GetAllSubscribersForMime ¶
func (t *MediaTrackSubscriptions) GetAllSubscribersForMime(mime string) []livekit.ParticipantID
func (*MediaTrackSubscriptions) GetNumSubscribers ¶
func (t *MediaTrackSubscriptions) GetNumSubscribers() int
func (*MediaTrackSubscriptions) IsSubscriber ¶
func (t *MediaTrackSubscriptions) IsSubscriber(subID livekit.ParticipantID) bool
func (*MediaTrackSubscriptions) OnDownTrackCreated ¶
func (t *MediaTrackSubscriptions) OnDownTrackCreated(f func(downTrack *sfu.DownTrack))
func (*MediaTrackSubscriptions) OnSubscriberMaxQualityChange ¶
func (t *MediaTrackSubscriptions) OnSubscriberMaxQualityChange(f func(subscriberID livekit.ParticipantID, codec webrtc.RTPCodecCapability, layer int32))
func (*MediaTrackSubscriptions) RemoveSubscriber ¶
func (t *MediaTrackSubscriptions) RemoveSubscriber(subscriberID livekit.ParticipantID, willBeResumed bool) error
RemoveSubscriber removes participant from subscription stop all forwarders to the client
func (*MediaTrackSubscriptions) ResyncAllSubscribers ¶
func (t *MediaTrackSubscriptions) ResyncAllSubscribers()
func (*MediaTrackSubscriptions) SetMuted ¶
func (t *MediaTrackSubscriptions) SetMuted(muted bool)
func (*MediaTrackSubscriptions) UpdateVideoLayers ¶
func (t *MediaTrackSubscriptions) UpdateVideoLayers()
type MediaTrackSubscriptionsParams ¶
type MediaTrackSubscriptionsParams struct { MediaTrack types.MediaTrack IsRelayed bool ReceiverConfig ReceiverConfig SubscriberConfig DirectionConfig Telemetry telemetry.TelemetryService Logger logger.Logger }
type PCTransport ¶
type PCTransport struct {
// contains filtered or unexported fields
}
PCTransport is a wrapper around PeerConnection, with some helper methods
func NewPCTransport ¶
func NewPCTransport(params TransportParams) (*PCTransport, error)
func (*PCTransport) AddICECandidate ¶
func (t *PCTransport) AddICECandidate(candidate webrtc.ICECandidateInit)
func (*PCTransport) AddTrack ¶
func (t *PCTransport) AddTrack(trackLocal webrtc.TrackLocal, params types.AddTrackParams) (sender *webrtc.RTPSender, transceiver *webrtc.RTPTransceiver, err error)
func (*PCTransport) AddTrackToStreamAllocator ¶
func (t *PCTransport) AddTrackToStreamAllocator(subTrack types.SubscribedTrack)
func (*PCTransport) AddTransceiverFromTrack ¶
func (t *PCTransport) AddTransceiverFromTrack(trackLocal webrtc.TrackLocal, params types.AddTrackParams) (sender *webrtc.RTPSender, transceiver *webrtc.RTPTransceiver, err error)
func (*PCTransport) Close ¶
func (t *PCTransport) Close()
func (*PCTransport) CreateDataChannel ¶
func (t *PCTransport) CreateDataChannel(label string, dci *webrtc.DataChannelInit) error
func (*PCTransport) CreateDataChannelIfEmpty ¶
func (*PCTransport) GetICEConnectionDetails ¶
func (t *PCTransport) GetICEConnectionDetails() *types.ICEConnectionDetails
func (*PCTransport) GetMid ¶
func (t *PCTransport) GetMid(rtpReceiver *webrtc.RTPReceiver) string
func (*PCTransport) GetPacer ¶
func (t *PCTransport) GetPacer() pacer.Pacer
func (*PCTransport) GetRTPReceiver ¶
func (t *PCTransport) GetRTPReceiver(mid string) *webrtc.RTPReceiver
func (*PCTransport) HandleRemoteDescription ¶
func (t *PCTransport) HandleRemoteDescription(sd webrtc.SessionDescription)
func (*PCTransport) HasEverConnected ¶
func (t *PCTransport) HasEverConnected() bool
func (*PCTransport) ICERestart ¶
func (t *PCTransport) ICERestart() error
func (*PCTransport) IsEstablished ¶
func (t *PCTransport) IsEstablished() bool
IsEstablished returns true if the PeerConnection has been established
func (*PCTransport) IsShortConnection ¶
func (*PCTransport) Negotiate ¶
func (t *PCTransport) Negotiate(force bool)
func (*PCTransport) OnNegotiationStateChanged ¶
func (t *PCTransport) OnNegotiationStateChanged(f func(state transport.NegotiationState))
func (*PCTransport) RemoveTrack ¶
func (t *PCTransport) RemoveTrack(sender *webrtc.RTPSender) error
func (*PCTransport) RemoveTrackFromStreamAllocator ¶
func (t *PCTransport) RemoveTrackFromStreamAllocator(subTrack types.SubscribedTrack)
func (*PCTransport) ResetShortConnOnICERestart ¶
func (t *PCTransport) ResetShortConnOnICERestart()
func (*PCTransport) SendDataPacket ¶
func (t *PCTransport) SendDataPacket(kind livekit.DataPacket_Kind, encoded []byte) error
func (*PCTransport) SetAllowPauseOfStreamAllocator ¶
func (t *PCTransport) SetAllowPauseOfStreamAllocator(allowPause bool)
func (*PCTransport) SetChannelCapacityOfStreamAllocator ¶
func (t *PCTransport) SetChannelCapacityOfStreamAllocator(channelCapacity int64)
func (*PCTransport) SetPreferTCP ¶
func (t *PCTransport) SetPreferTCP(preferTCP bool)
func (*PCTransport) SetPreviousSdp ¶
func (t *PCTransport) SetPreviousSdp(offer, answer *webrtc.SessionDescription)
func (*PCTransport) SetSignalingRTT ¶
func (t *PCTransport) SetSignalingRTT(rtt uint32)
type ParticipantImpl ¶
type ParticipantImpl struct { *TransportManager *UpTrackManager *SubscriptionManager *ParticipantTrafficLoad // contains filtered or unexported fields }
func NewParticipant ¶
func NewParticipant(params ParticipantParams) (*ParticipantImpl, error)
func (*ParticipantImpl) AddTrack ¶
func (p *ParticipantImpl) AddTrack(req *livekit.AddTrackRequest)
AddTrack is called when client intends to publish track. records track details and lets client know it's ok to proceed
func (*ParticipantImpl) CacheDownTrack ¶
func (p *ParticipantImpl) CacheDownTrack(trackID livekit.TrackID, rtpTransceiver *webrtc.RTPTransceiver, downTrack sfu.DownTrackState)
func (*ParticipantImpl) CanPublishData ¶
func (p *ParticipantImpl) CanPublishData() bool
func (*ParticipantImpl) CanPublishSource ¶
func (p *ParticipantImpl) CanPublishSource(source livekit.TrackSource) bool
func (*ParticipantImpl) CanSkipBroadcast ¶
func (p *ParticipantImpl) CanSkipBroadcast() bool
func (*ParticipantImpl) CanSubscribe ¶
func (p *ParticipantImpl) CanSubscribe() bool
func (*ParticipantImpl) ClaimGrants ¶
func (p *ParticipantImpl) ClaimGrants() *auth.ClaimGrants
func (*ParticipantImpl) Close ¶
func (p *ParticipantImpl) Close(sendLeave bool, reason types.ParticipantCloseReason, isExpectedToResume bool) error
func (*ParticipantImpl) CloseReason ¶
func (p *ParticipantImpl) CloseReason() types.ParticipantCloseReason
func (*ParticipantImpl) CloseSignalConnection ¶
func (p *ParticipantImpl) CloseSignalConnection(reason types.SignallingCloseReason)
closes signal connection to notify client to resume/reconnect
func (*ParticipantImpl) ConnectedAt ¶
func (p *ParticipantImpl) ConnectedAt() time.Time
func (*ParticipantImpl) DebugInfo ¶
func (p *ParticipantImpl) DebugInfo() map[string]interface{}
func (*ParticipantImpl) GetAdaptiveStream ¶
func (p *ParticipantImpl) GetAdaptiveStream() bool
func (*ParticipantImpl) GetBufferFactory ¶
func (p *ParticipantImpl) GetBufferFactory() *buffer.Factory
func (*ParticipantImpl) GetCachedDownTrack ¶
func (p *ParticipantImpl) GetCachedDownTrack(trackID livekit.TrackID) (*webrtc.RTPTransceiver, sfu.DownTrackState)
func (*ParticipantImpl) GetClientConfiguration ¶
func (p *ParticipantImpl) GetClientConfiguration() *livekit.ClientConfiguration
func (*ParticipantImpl) GetClientInfo ¶
func (p *ParticipantImpl) GetClientInfo() *livekit.ClientInfo
func (*ParticipantImpl) GetConnectionQuality ¶
func (p *ParticipantImpl) GetConnectionQuality() *livekit.ConnectionQualityInfo
func (*ParticipantImpl) GetLogger ¶
func (p *ParticipantImpl) GetLogger() logger.Logger
func (*ParticipantImpl) GetPacer ¶
func (p *ParticipantImpl) GetPacer() pacer.Pacer
func (*ParticipantImpl) GetPendingTrack ¶
func (p *ParticipantImpl) GetPendingTrack(trackID livekit.TrackID) *livekit.TrackInfo
func (*ParticipantImpl) GetPlayoutDelayConfig ¶
func (p *ParticipantImpl) GetPlayoutDelayConfig() *livekit.PlayoutDelay
func (*ParticipantImpl) GetTrailer ¶
func (p *ParticipantImpl) GetTrailer() []byte
func (*ParticipantImpl) HandleAnswer ¶
func (p *ParticipantImpl) HandleAnswer(answer webrtc.SessionDescription)
HandleAnswer handles a client answer response, with subscriber PC, server initiates the offer and client answers
func (*ParticipantImpl) HandleOffer ¶
func (p *ParticipantImpl) HandleOffer(offer webrtc.SessionDescription)
HandleOffer an offer from remote participant, used when clients make the initial connection
func (*ParticipantImpl) HandleReconnectAndSendResponse ¶
func (p *ParticipantImpl) HandleReconnectAndSendResponse(reconnectReason livekit.ReconnectReason, reconnectResponse *livekit.ReconnectResponse) error
func (*ParticipantImpl) HandleSignalSourceClose ¶
func (p *ParticipantImpl) HandleSignalSourceClose()
func (*ParticipantImpl) HasConnected ¶
func (p *ParticipantImpl) HasConnected() bool
func (*ParticipantImpl) Hidden ¶
func (p *ParticipantImpl) Hidden() bool
func (*ParticipantImpl) ICERestart ¶
func (p *ParticipantImpl) ICERestart(iceConfig *livekit.ICEConfig)
ICERestart restarts subscriber ICE connections
func (*ParticipantImpl) ID ¶
func (p *ParticipantImpl) ID() livekit.ParticipantID
func (*ParticipantImpl) Identity ¶
func (p *ParticipantImpl) Identity() livekit.ParticipantIdentity
func (*ParticipantImpl) IsClosed ¶
func (p *ParticipantImpl) IsClosed() bool
func (*ParticipantImpl) IsDependent ¶
func (p *ParticipantImpl) IsDependent() bool
func (*ParticipantImpl) IsDisconnected ¶
func (p *ParticipantImpl) IsDisconnected() bool
func (*ParticipantImpl) IsIdle ¶
func (p *ParticipantImpl) IsIdle() bool
func (*ParticipantImpl) IsPublisher ¶
func (p *ParticipantImpl) IsPublisher() bool
func (*ParticipantImpl) IsReady ¶
func (p *ParticipantImpl) IsReady() bool
func (*ParticipantImpl) IssueFullReconnect ¶
func (p *ParticipantImpl) IssueFullReconnect(reason types.ParticipantCloseReason)
func (*ParticipantImpl) Kind ¶
func (p *ParticipantImpl) Kind() livekit.ParticipantInfo_Kind
func (*ParticipantImpl) MaybeStartMigration ¶
func (p *ParticipantImpl) MaybeStartMigration(force bool, onStart func()) bool
func (*ParticipantImpl) MigrateState ¶
func (p *ParticipantImpl) MigrateState() types.MigrateState
func (*ParticipantImpl) Negotiate ¶
func (p *ParticipantImpl) Negotiate(force bool)
Negotiate subscriber SDP with client, if force is true, will cancel pending negotiate task and negotiate immediately
func (*ParticipantImpl) NotifyMigration ¶
func (p *ParticipantImpl) NotifyMigration()
func (*ParticipantImpl) OnClaimsChanged ¶
func (p *ParticipantImpl) OnClaimsChanged(callback func(types.LocalParticipant))
func (*ParticipantImpl) OnClose ¶
func (p *ParticipantImpl) OnClose(callback func(types.LocalParticipant))
func (*ParticipantImpl) OnDataPacket ¶
func (p *ParticipantImpl) OnDataPacket(callback func(types.LocalParticipant, livekit.DataPacket_Kind, *livekit.DataPacket))
func (*ParticipantImpl) OnICEConfigChanged ¶
func (p *ParticipantImpl) OnICEConfigChanged(f func(participant types.LocalParticipant, iceConfig *livekit.ICEConfig))
func (*ParticipantImpl) OnMigrateStateChange ¶
func (p *ParticipantImpl) OnMigrateStateChange(callback func(p types.LocalParticipant, state types.MigrateState))
func (*ParticipantImpl) OnParticipantUpdate ¶
func (p *ParticipantImpl) OnParticipantUpdate(callback func(types.LocalParticipant))
func (*ParticipantImpl) OnStateChange ¶
func (p *ParticipantImpl) OnStateChange(callback func(p types.LocalParticipant, state livekit.ParticipantInfo_State))
func (*ParticipantImpl) OnTrackPublished ¶
func (p *ParticipantImpl) OnTrackPublished(callback func(types.LocalParticipant, types.MediaTrack))
func (*ParticipantImpl) OnTrackUnpublished ¶
func (p *ParticipantImpl) OnTrackUnpublished(callback func(types.LocalParticipant, types.MediaTrack))
func (*ParticipantImpl) OnTrackUpdated ¶
func (p *ParticipantImpl) OnTrackUpdated(callback func(types.LocalParticipant, types.MediaTrack))
func (*ParticipantImpl) ProtocolVersion ¶
func (p *ParticipantImpl) ProtocolVersion() types.ProtocolVersion
func (*ParticipantImpl) SendConnectionQualityUpdate ¶
func (p *ParticipantImpl) SendConnectionQualityUpdate(update *livekit.ConnectionQualityUpdate) error
func (*ParticipantImpl) SendDataPacket ¶
func (p *ParticipantImpl) SendDataPacket(kind livekit.DataPacket_Kind, encoded []byte) error
func (*ParticipantImpl) SendJoinResponse ¶
func (p *ParticipantImpl) SendJoinResponse(joinResponse *livekit.JoinResponse) error
func (*ParticipantImpl) SendParticipantUpdate ¶
func (p *ParticipantImpl) SendParticipantUpdate(participantsToUpdate []*livekit.ParticipantInfo) error
func (*ParticipantImpl) SendRefreshToken ¶
func (p *ParticipantImpl) SendRefreshToken(token string) error
func (*ParticipantImpl) SendRoomUpdate ¶
func (p *ParticipantImpl) SendRoomUpdate(room *livekit.Room) error
func (*ParticipantImpl) SendSpeakerUpdate ¶
func (p *ParticipantImpl) SendSpeakerUpdate(speakers []*livekit.SpeakerInfo, force bool) error
SendSpeakerUpdate notifies participant changes to speakers. only send members that have changed since last update
func (*ParticipantImpl) SetMetadata ¶
func (p *ParticipantImpl) SetMetadata(metadata string)
SetMetadata attaches metadata to the participant
func (*ParticipantImpl) SetMigrateInfo ¶
func (p *ParticipantImpl) SetMigrateInfo( previousOffer, previousAnswer *webrtc.SessionDescription, mediaTracks []*livekit.TrackPublishedResponse, dataChannels []*livekit.DataChannelInfo, )
func (*ParticipantImpl) SetMigrateState ¶
func (p *ParticipantImpl) SetMigrateState(s types.MigrateState)
func (*ParticipantImpl) SetName ¶
func (p *ParticipantImpl) SetName(name string)
SetName attaches name to the participant
func (*ParticipantImpl) SetPermission ¶
func (p *ParticipantImpl) SetPermission(permission *livekit.ParticipantPermission) bool
func (*ParticipantImpl) SetResponseSink ¶
func (p *ParticipantImpl) SetResponseSink(sink routing.MessageSink)
func (*ParticipantImpl) SetTrackMuted ¶
func (*ParticipantImpl) State ¶
func (p *ParticipantImpl) State() livekit.ParticipantInfo_State
func (*ParticipantImpl) SubscriptionPermissionUpdate ¶
func (p *ParticipantImpl) SubscriptionPermissionUpdate(publisherID livekit.ParticipantID, trackID livekit.TrackID, allowed bool)
func (*ParticipantImpl) SupportsSyncStreamID ¶
func (p *ParticipantImpl) SupportsSyncStreamID() bool
func (*ParticipantImpl) SupportsTransceiverReuse ¶
func (p *ParticipantImpl) SupportsTransceiverReuse() bool
func (*ParticipantImpl) ToProto ¶
func (p *ParticipantImpl) ToProto() *livekit.ParticipantInfo
func (*ParticipantImpl) ToProtoWithVersion ¶
func (p *ParticipantImpl) ToProtoWithVersion() (*livekit.ParticipantInfo, utils.TimedVersion)
func (*ParticipantImpl) UncacheDownTrack ¶
func (p *ParticipantImpl) UncacheDownTrack(rtpTransceiver *webrtc.RTPTransceiver)
func (*ParticipantImpl) UpdateMediaLoss ¶
func (*ParticipantImpl) UpdateMediaRTT ¶
func (p *ParticipantImpl) UpdateMediaRTT(rtt uint32)
func (*ParticipantImpl) UpdateSubscribedQuality ¶
func (p *ParticipantImpl) UpdateSubscribedQuality(nodeID livekit.NodeID, trackID livekit.TrackID, maxQualities []types.SubscribedCodecQuality) error
func (*ParticipantImpl) VerifySubscribeParticipantInfo ¶
func (p *ParticipantImpl) VerifySubscribeParticipantInfo(pID livekit.ParticipantID, version uint32)
type ParticipantOptions ¶
type ParticipantOptions struct {
AutoSubscribe bool
}
type ParticipantParams ¶
type ParticipantParams struct { Identity livekit.ParticipantIdentity Name livekit.ParticipantName SID livekit.ParticipantID Config *WebRTCConfig Sink routing.MessageSink AudioConfig config.AudioConfig VideoConfig config.VideoConfig ProtocolVersion types.ProtocolVersion SessionStartTime time.Time Telemetry telemetry.TelemetryService Trailer []byte PLIThrottleConfig config.PLIThrottleConfig CongestionControlConfig config.CongestionControlConfig // codecs that are enabled for this room PublishEnabledCodecs []*livekit.Codec SubscribeEnabledCodecs []*livekit.Codec Logger logger.Logger SimTracks map[uint32]SimulcastTrackInfo Grants *auth.ClaimGrants InitialVersion uint32 ClientConf *livekit.ClientConfiguration ClientInfo ClientInfo Region string Migration bool AdaptiveStream bool AllowTCPFallback bool TCPFallbackRTTThreshold int AllowUDPUnstableFallback bool TURNSEnabled bool GetParticipantInfo func(pID livekit.ParticipantID) *livekit.ParticipantInfo GetRegionSettings func(ip string) *livekit.RegionSettings DisableSupervisor bool ReconnectOnPublicationError bool ReconnectOnSubscriptionError bool ReconnectOnDataChannelError bool DataChannelMaxBufferedAmount uint64 VersionGenerator utils.TimedVersionGenerator TrackResolver types.MediaTrackResolver DisableDynacast bool SubscriberAllowPause bool SubscriptionLimitAudio int32 SubscriptionLimitVideo int32 PlayoutDelay *livekit.PlayoutDelay SyncStreams bool }
type ParticipantTrafficLoad ¶
type ParticipantTrafficLoad struct {
// contains filtered or unexported fields
}
func NewParticipantTrafficLoad ¶
func NewParticipantTrafficLoad(params ParticipantTrafficLoadParams) *ParticipantTrafficLoad
func (*ParticipantTrafficLoad) Close ¶
func (p *ParticipantTrafficLoad) Close()
func (*ParticipantTrafficLoad) GetTrafficLoad ¶
func (p *ParticipantTrafficLoad) GetTrafficLoad() *types.TrafficLoad
func (*ParticipantTrafficLoad) OnTrafficLoad ¶
func (p *ParticipantTrafficLoad) OnTrafficLoad(f func(trafficLoad *types.TrafficLoad))
type ParticipantTrafficLoadParams ¶
type ParticipantTrafficLoadParams struct { Participant *ParticipantImpl DataChannelStats *telemetry.BytesTrackStats Logger logger.Logger }
type PrimaryTransportHandler ¶
func (PrimaryTransportHandler) OnFullyEstablished ¶
func (h PrimaryTransportHandler) OnFullyEstablished()
func (PrimaryTransportHandler) OnInitialConnected ¶
func (h PrimaryTransportHandler) OnInitialConnected()
type PublisherTransportHandler ¶
type PublisherTransportHandler struct {
AnyTransportHandler
}
func (PublisherTransportHandler) OnAnswer ¶
func (h PublisherTransportHandler) OnAnswer(sd webrtc.SessionDescription) error
func (PublisherTransportHandler) OnDataPacket ¶
func (h PublisherTransportHandler) OnDataPacket(kind livekit.DataPacket_Kind, data []byte)
func (PublisherTransportHandler) OnInitialConnected ¶
func (h PublisherTransportHandler) OnInitialConnected()
func (PublisherTransportHandler) OnTrack ¶
func (h PublisherTransportHandler) OnTrack(track *webrtc.TrackRemote, rtpReceiver *webrtc.RTPReceiver)
type RTCPFeedbackConfig ¶
type RTCPFeedbackConfig struct { Audio []webrtc.RTCPFeedback Video []webrtc.RTCPFeedback }
type ReceiverConfig ¶
type Room ¶
func NewRoom ¶
func NewRoom( room *livekit.Room, internal *livekit.RoomInternal, config WebRTCConfig, roomConfig config.RoomConfig, audioConfig *config.AudioConfig, serverInfo *livekit.ServerInfo, telemetry telemetry.TelemetryService, agentClient agent.Client, egressLauncher EgressLauncher, ) *Room
func (*Room) Close ¶
func (r *Room) Close(reason types.ParticipantCloseReason)
func (*Room) CloseIfEmpty ¶
func (r *Room) CloseIfEmpty()
CloseIfEmpty closes the room if all participants had left, or it's still empty past timeout
func (*Room) FirstJoinedAt ¶
func (*Room) GetActiveSpeakers ¶
func (r *Room) GetActiveSpeakers() []*livekit.SpeakerInfo
func (*Room) GetBufferFactory ¶
func (*Room) GetLocalParticipants ¶
func (r *Room) GetLocalParticipants() []types.LocalParticipant
func (*Room) GetParticipant ¶
func (r *Room) GetParticipant(identity livekit.ParticipantIdentity) types.LocalParticipant
func (*Room) GetParticipantByID ¶
func (r *Room) GetParticipantByID(participantID livekit.ParticipantID) types.LocalParticipant
func (*Room) GetParticipantCount ¶
func (*Room) GetParticipantRequestSource ¶
func (r *Room) GetParticipantRequestSource(identity livekit.ParticipantIdentity) routing.MessageSource
func (*Room) GetParticipants ¶
func (r *Room) GetParticipants() []types.LocalParticipant
func (*Room) Internal ¶
func (r *Room) Internal() *livekit.RoomInternal
func (*Room) Join ¶
func (r *Room) Join(participant types.LocalParticipant, requestSource routing.MessageSource, opts *ParticipantOptions, iceServers []*livekit.ICEServer) error
func (*Room) LastLeftAt ¶
func (*Room) OnParticipantChanged ¶
func (r *Room) OnParticipantChanged(f func(participant types.LocalParticipant))
func (*Room) OnRoomUpdated ¶
func (r *Room) OnRoomUpdated(f func())
func (*Room) RemoveParticipant ¶
func (r *Room) RemoveParticipant(identity livekit.ParticipantIdentity, pID livekit.ParticipantID, reason types.ParticipantCloseReason)
func (*Room) ReplaceParticipantRequestSource ¶
func (r *Room) ReplaceParticipantRequestSource(identity livekit.ParticipantIdentity, reqSource routing.MessageSource)
func (*Room) ResolveMediaTrackForSubscriber ¶
func (r *Room) ResolveMediaTrackForSubscriber(subIdentity livekit.ParticipantIdentity, trackID livekit.TrackID) types.MediaResolverResult
func (*Room) ResumeParticipant ¶
func (r *Room) ResumeParticipant(p types.LocalParticipant, requestSource routing.MessageSource, responseSink routing.MessageSink, iceServers []*livekit.ICEServer, reason livekit.ReconnectReason) error
func (*Room) SendDataPacket ¶
func (r *Room) SendDataPacket(dp *livekit.DataPacket, kind livekit.DataPacket_Kind)
func (*Room) SetMetadata ¶
func (*Room) SimulateScenario ¶
func (r *Room) SimulateScenario(participant types.LocalParticipant, simulateScenario *livekit.SimulateScenario) error
func (*Room) UpdateParticipantMetadata ¶
func (r *Room) UpdateParticipantMetadata(participant types.LocalParticipant, name string, metadata string)
func (*Room) UpdateSubscriptionPermission ¶
func (r *Room) UpdateSubscriptionPermission(participant types.LocalParticipant, subscriptionPermission *livekit.SubscriptionPermission) error
func (*Room) UpdateSubscriptions ¶
func (r *Room) UpdateSubscriptions( participant types.LocalParticipant, trackIDs []livekit.TrackID, participantTracks []*livekit.ParticipantTracks, subscribe bool, )
func (*Room) UpdateVideoLayers ¶
func (r *Room) UpdateVideoLayers(participant types.Participant, updateVideoLayers *livekit.UpdateVideoLayers) error
type RoomTrackManager ¶
type RoomTrackManager struct {
// contains filtered or unexported fields
}
RoomTrackManager holds tracks that are published to the room
func NewRoomTrackManager ¶
func NewRoomTrackManager() *RoomTrackManager
func (*RoomTrackManager) AddTrack ¶
func (r *RoomTrackManager) AddTrack(track types.MediaTrack, publisherIdentity livekit.ParticipantIdentity, publisherID livekit.ParticipantID)
func (*RoomTrackManager) GetOrCreateTrackChangeNotifier ¶
func (r *RoomTrackManager) GetOrCreateTrackChangeNotifier(trackID livekit.TrackID) *utils.ChangeNotifier
func (*RoomTrackManager) GetOrCreateTrackRemoveNotifier ¶
func (r *RoomTrackManager) GetOrCreateTrackRemoveNotifier(trackID livekit.TrackID) *utils.ChangeNotifier
func (*RoomTrackManager) GetTrackInfo ¶
func (r *RoomTrackManager) GetTrackInfo(trackID livekit.TrackID) *TrackInfo
func (*RoomTrackManager) HasObservers ¶
func (r *RoomTrackManager) HasObservers(track types.MediaTrack) bool
HasObservers lets caller know if the current media track has any observers this is used to signal interest in the track. when another MediaTrack with the same trackID is being used, track is not considered to be observed.
func (*RoomTrackManager) NotifyTrackChanged ¶
func (r *RoomTrackManager) NotifyTrackChanged(trackID livekit.TrackID)
func (*RoomTrackManager) RemoveTrack ¶
func (r *RoomTrackManager) RemoveTrack(track types.MediaTrack)
type SimulcastTrackInfo ¶
type SubscribedTrack ¶
type SubscribedTrack struct {
// contains filtered or unexported fields
}
func NewSubscribedTrack ¶
func NewSubscribedTrack(params SubscribedTrackParams) *SubscribedTrack
func (*SubscribedTrack) AddOnBind ¶
func (t *SubscribedTrack) AddOnBind(f func(error))
func (*SubscribedTrack) Bound ¶
func (t *SubscribedTrack) Bound(err error)
for DownTrack callback to notify us that it's bound
func (*SubscribedTrack) Close ¶
func (t *SubscribedTrack) Close(willBeResumed bool)
for DownTrack callback to notify us that it's closed
func (*SubscribedTrack) DownTrack ¶
func (t *SubscribedTrack) DownTrack() *sfu.DownTrack
func (*SubscribedTrack) ID ¶
func (t *SubscribedTrack) ID() livekit.TrackID
func (*SubscribedTrack) IsBound ¶
func (t *SubscribedTrack) IsBound() bool
func (*SubscribedTrack) IsMuted ¶
func (t *SubscribedTrack) IsMuted() bool
has subscriber indicated it wants to mute this track
func (*SubscribedTrack) MediaTrack ¶
func (t *SubscribedTrack) MediaTrack() types.MediaTrack
func (*SubscribedTrack) NeedsNegotiation ¶
func (t *SubscribedTrack) NeedsNegotiation() bool
func (*SubscribedTrack) OnClose ¶
func (t *SubscribedTrack) OnClose(f func(bool))
func (*SubscribedTrack) PublisherID ¶
func (t *SubscribedTrack) PublisherID() livekit.ParticipantID
func (*SubscribedTrack) PublisherIdentity ¶
func (t *SubscribedTrack) PublisherIdentity() livekit.ParticipantIdentity
func (*SubscribedTrack) PublisherVersion ¶
func (t *SubscribedTrack) PublisherVersion() uint32
func (*SubscribedTrack) RTPSender ¶
func (t *SubscribedTrack) RTPSender() *webrtc.RTPSender
func (*SubscribedTrack) SetNeedsNegotiation ¶
func (t *SubscribedTrack) SetNeedsNegotiation(needs bool)
func (*SubscribedTrack) SetPublisherMuted ¶
func (t *SubscribedTrack) SetPublisherMuted(muted bool)
func (*SubscribedTrack) SetRTPSender ¶
func (t *SubscribedTrack) SetRTPSender(sender *webrtc.RTPSender)
func (*SubscribedTrack) Subscriber ¶
func (t *SubscribedTrack) Subscriber() types.LocalParticipant
func (*SubscribedTrack) SubscriberID ¶
func (t *SubscribedTrack) SubscriberID() livekit.ParticipantID
func (*SubscribedTrack) SubscriberIdentity ¶
func (t *SubscribedTrack) SubscriberIdentity() livekit.ParticipantIdentity
func (*SubscribedTrack) UpdateSubscriberSettings ¶
func (t *SubscribedTrack) UpdateSubscriberSettings(settings *livekit.UpdateTrackSettings, isImmediate bool)
func (*SubscribedTrack) UpdateVideoLayer ¶
func (t *SubscribedTrack) UpdateVideoLayer()
type SubscribedTrackParams ¶
type SubscribedTrackParams struct { PublisherID livekit.ParticipantID PublisherIdentity livekit.ParticipantIdentity PublisherVersion uint32 Subscriber types.LocalParticipant MediaTrack types.MediaTrack DownTrack *sfu.DownTrack AdaptiveStream bool }
type SubscriberTransportHandler ¶
type SubscriberTransportHandler struct {
AnyTransportHandler
}
func (SubscriberTransportHandler) OnInitialConnected ¶
func (h SubscriberTransportHandler) OnInitialConnected()
func (SubscriberTransportHandler) OnOffer ¶
func (h SubscriberTransportHandler) OnOffer(sd webrtc.SessionDescription) error
func (SubscriberTransportHandler) OnStreamStateChange ¶
func (h SubscriberTransportHandler) OnStreamStateChange(update *streamallocator.StreamStateUpdate) error
type SubscriptionManager ¶
type SubscriptionManager struct {
// contains filtered or unexported fields
}
SubscriptionManager manages a participant's subscriptions
func NewSubscriptionManager ¶
func NewSubscriptionManager(params SubscriptionManagerParams) *SubscriptionManager
func (*SubscriptionManager) Close ¶
func (m *SubscriptionManager) Close(willBeResumed bool)
func (*SubscriptionManager) GetSubscribedParticipants ¶
func (m *SubscriptionManager) GetSubscribedParticipants() []livekit.ParticipantID
func (*SubscriptionManager) GetSubscribedTracks ¶
func (m *SubscriptionManager) GetSubscribedTracks() []types.SubscribedTrack
func (*SubscriptionManager) HasSubscriptions ¶
func (m *SubscriptionManager) HasSubscriptions() bool
func (*SubscriptionManager) IsSubscribedTo ¶
func (m *SubscriptionManager) IsSubscribedTo(participantID livekit.ParticipantID) bool
func (*SubscriptionManager) OnSubscribeStatusChanged ¶
func (m *SubscriptionManager) OnSubscribeStatusChanged(fn func(publisherID livekit.ParticipantID, subscribed bool))
OnSubscribeStatusChanged callback will be notified when a participant subscribes or unsubscribes to another participant it will only fire once per publisher. If current participant is subscribed to multiple tracks from another, this callback will only fire once.
func (*SubscriptionManager) ReconcileAll ¶
func (m *SubscriptionManager) ReconcileAll()
func (*SubscriptionManager) SubscribeToTrack ¶
func (m *SubscriptionManager) SubscribeToTrack(trackID livekit.TrackID)
func (*SubscriptionManager) UnsubscribeFromTrack ¶
func (m *SubscriptionManager) UnsubscribeFromTrack(trackID livekit.TrackID)
func (*SubscriptionManager) UpdateSubscribedTrackSettings ¶
func (m *SubscriptionManager) UpdateSubscribedTrackSettings(trackID livekit.TrackID, settings *livekit.UpdateTrackSettings)
func (*SubscriptionManager) WaitUntilSubscribed ¶
func (m *SubscriptionManager) WaitUntilSubscribed(timeout time.Duration) error
type SubscriptionManagerParams ¶
type SubscriptionManagerParams struct { Logger logger.Logger Participant types.LocalParticipant TrackResolver types.MediaTrackResolver OnTrackSubscribed func(subTrack types.SubscribedTrack) OnTrackUnsubscribed func(subTrack types.SubscribedTrack) OnSubscriptionError func(trackID livekit.TrackID, fatal bool, err error) Telemetry telemetry.TelemetryService SubscriptionLimitVideo, SubscriptionLimitAudio int32 }
type TrackInfo ¶
type TrackInfo struct { Track types.MediaTrack PublisherIdentity livekit.ParticipantIdentity PublisherID livekit.ParticipantID }
type TransportManager ¶
type TransportManager struct {
// contains filtered or unexported fields
}
func NewTransportManager ¶
func NewTransportManager(params TransportManagerParams) (*TransportManager, error)
func (*TransportManager) AddICECandidate ¶
func (t *TransportManager) AddICECandidate(candidate webrtc.ICECandidateInit, target livekit.SignalTarget)
AddICECandidate adds candidates for remote peer
func (*TransportManager) AddSubscribedTrack ¶
func (t *TransportManager) AddSubscribedTrack(subTrack types.SubscribedTrack)
func (*TransportManager) AddTrackToSubscriber ¶
func (t *TransportManager) AddTrackToSubscriber(trackLocal webrtc.TrackLocal, params types.AddTrackParams) (*webrtc.RTPSender, *webrtc.RTPTransceiver, error)
func (*TransportManager) AddTransceiverFromTrackToSubscriber ¶
func (t *TransportManager) AddTransceiverFromTrackToSubscriber(trackLocal webrtc.TrackLocal, params types.AddTrackParams) (*webrtc.RTPSender, *webrtc.RTPTransceiver, error)
func (*TransportManager) Close ¶
func (t *TransportManager) Close()
func (*TransportManager) GetICEConnectionDetails ¶
func (t *TransportManager) GetICEConnectionDetails() []*types.ICEConnectionDetails
func (*TransportManager) GetPublisherMid ¶
func (t *TransportManager) GetPublisherMid(rtpReceiver *webrtc.RTPReceiver) string
func (*TransportManager) GetPublisherRTPReceiver ¶
func (t *TransportManager) GetPublisherRTPReceiver(mid string) *webrtc.RTPReceiver
func (*TransportManager) GetSubscriberPacer ¶
func (t *TransportManager) GetSubscriberPacer() pacer.Pacer
func (*TransportManager) GetUnmatchMediaForOffer ¶
func (t *TransportManager) GetUnmatchMediaForOffer(offer webrtc.SessionDescription, mediaType string) (parsed *sdp.SessionDescription, unmatched []*sdp.MediaDescription, err error)
func (*TransportManager) HandleAnswer ¶
func (t *TransportManager) HandleAnswer(answer webrtc.SessionDescription)
func (*TransportManager) HandleClientReconnect ¶
func (t *TransportManager) HandleClientReconnect(reason livekit.ReconnectReason)
func (*TransportManager) HandleOffer ¶
func (t *TransportManager) HandleOffer(offer webrtc.SessionDescription, shouldPend bool)
func (*TransportManager) HandleReceiverReport ¶
func (t *TransportManager) HandleReceiverReport(dt *sfu.DownTrack, report *rtcp.ReceiverReport)
func (*TransportManager) HasPublisherEverConnected ¶
func (t *TransportManager) HasPublisherEverConnected() bool
func (*TransportManager) HasSubscriberEverConnected ¶
func (t *TransportManager) HasSubscriberEverConnected() bool
func (*TransportManager) ICERestart ¶
func (t *TransportManager) ICERestart(iceConfig *livekit.ICEConfig) error
func (*TransportManager) IsPublisherEstablished ¶
func (t *TransportManager) IsPublisherEstablished() bool
func (*TransportManager) LastPublisherOffer ¶
func (t *TransportManager) LastPublisherOffer() webrtc.SessionDescription
func (*TransportManager) LastSeenSignalAt ¶
func (t *TransportManager) LastSeenSignalAt() time.Time
func (*TransportManager) NegotiateSubscriber ¶
func (t *TransportManager) NegotiateSubscriber(force bool)
func (*TransportManager) OnICEConfigChanged ¶
func (t *TransportManager) OnICEConfigChanged(f func(iceConfig *livekit.ICEConfig))
func (*TransportManager) ProcessPendingPublisherDataChannels ¶
func (t *TransportManager) ProcessPendingPublisherDataChannels()
func (*TransportManager) ProcessPendingPublisherOffer ¶
func (t *TransportManager) ProcessPendingPublisherOffer()
func (*TransportManager) RemoveSubscribedTrack ¶
func (t *TransportManager) RemoveSubscribedTrack(subTrack types.SubscribedTrack)
func (*TransportManager) RemoveTrackFromSubscriber ¶
func (t *TransportManager) RemoveTrackFromSubscriber(sender *webrtc.RTPSender) error
func (*TransportManager) SendDataPacket ¶
func (t *TransportManager) SendDataPacket(kind livekit.DataPacket_Kind, encoded []byte) error
func (*TransportManager) SetICEConfig ¶
func (t *TransportManager) SetICEConfig(iceConfig *livekit.ICEConfig)
func (*TransportManager) SetMigrateInfo ¶
func (t *TransportManager) SetMigrateInfo(previousOffer, previousAnswer *webrtc.SessionDescription, dataChannels []*livekit.DataChannelInfo)
func (*TransportManager) SetSignalSourceValid ¶
func (t *TransportManager) SetSignalSourceValid(valid bool)
func (*TransportManager) SetSubscriberAllowPause ¶
func (t *TransportManager) SetSubscriberAllowPause(allowPause bool)
func (*TransportManager) SetSubscriberChannelCapacity ¶
func (t *TransportManager) SetSubscriberChannelCapacity(channelCapacity int64)
func (*TransportManager) SinceLastSignal ¶
func (t *TransportManager) SinceLastSignal() time.Duration
func (*TransportManager) SubscriberAsPrimary ¶
func (t *TransportManager) SubscriberAsPrimary() bool
func (*TransportManager) SubscriberClose ¶
func (t *TransportManager) SubscriberClose()
func (*TransportManager) UpdateLastSeenSignal ¶
func (t *TransportManager) UpdateLastSeenSignal()
func (*TransportManager) UpdateMediaRTT ¶
func (t *TransportManager) UpdateMediaRTT(rtt uint32)
func (*TransportManager) UpdateSignalingRTT ¶
func (t *TransportManager) UpdateSignalingRTT(rtt uint32)
func (*TransportManager) WritePublisherRTCP ¶
func (t *TransportManager) WritePublisherRTCP(pkts []rtcp.Packet) error
func (*TransportManager) WriteSubscriberRTCP ¶
func (t *TransportManager) WriteSubscriberRTCP(pkts []rtcp.Packet) error
type TransportManagerParams ¶
type TransportManagerParams struct { Identity livekit.ParticipantIdentity SID livekit.ParticipantID SubscriberAsPrimary bool Config *WebRTCConfig Twcc *twcc.Responder ProtocolVersion types.ProtocolVersion CongestionControlConfig config.CongestionControlConfig EnabledSubscribeCodecs []*livekit.Codec EnabledPublishCodecs []*livekit.Codec SimTracks map[uint32]SimulcastTrackInfo ClientInfo ClientInfo Migration bool AllowTCPFallback bool TCPFallbackRTTThreshold int AllowUDPUnstableFallback bool TURNSEnabled bool AllowPlayoutDelay bool DataChannelMaxBufferedAmount uint64 Logger logger.Logger PublisherHandler transport.Handler SubscriberHandler transport.Handler }
type TransportManagerPublisherTransportHandler ¶
type TransportManagerPublisherTransportHandler struct {
TransportManagerTransportHandler
}
func (TransportManagerPublisherTransportHandler) OnAnswer ¶
func (h TransportManagerPublisherTransportHandler) OnAnswer(sd webrtc.SessionDescription) error
type TransportManagerTransportHandler ¶
type TransportManagerTransportHandler struct { transport.Handler // contains filtered or unexported fields }
func (TransportManagerTransportHandler) OnFailed ¶
func (h TransportManagerTransportHandler) OnFailed(isShortLived bool)
type TransportParams ¶
type TransportParams struct { Handler transport.Handler ParticipantID livekit.ParticipantID ParticipantIdentity livekit.ParticipantIdentity ProtocolVersion types.ProtocolVersion Config *WebRTCConfig Twcc *lktwcc.Responder DirectionConfig DirectionConfig CongestionControlConfig config.CongestionControlConfig EnabledCodecs []*livekit.Codec Logger logger.Logger Transport livekit.SignalTarget SimTracks map[uint32]SimulcastTrackInfo ClientInfo ClientInfo IsOfferer bool IsSendSide bool AllowPlayoutDelay bool DataChannelMaxBufferedAmount uint64 }
type UnhandleSimulcastInterceptor ¶
type UnhandleSimulcastInterceptor struct { interceptor.NoOp // contains filtered or unexported fields }
func (*UnhandleSimulcastInterceptor) BindRemoteStream ¶
func (u *UnhandleSimulcastInterceptor) BindRemoteStream(info *interceptor.StreamInfo, reader interceptor.RTPReader) interceptor.RTPReader
type UnhandleSimulcastInterceptorFactory ¶
type UnhandleSimulcastInterceptorFactory struct {
// contains filtered or unexported fields
}
func NewUnhandleSimulcastInterceptorFactory ¶
func NewUnhandleSimulcastInterceptorFactory(opts ...UnhandleSimulcastOption) (*UnhandleSimulcastInterceptorFactory, error)
func (*UnhandleSimulcastInterceptorFactory) NewInterceptor ¶
func (f *UnhandleSimulcastInterceptorFactory) NewInterceptor(id string) (interceptor.Interceptor, error)
type UnhandleSimulcastOption ¶
type UnhandleSimulcastOption func(r *UnhandleSimulcastInterceptor) error
func UnhandleSimulcastTracks ¶
func UnhandleSimulcastTracks(tracks map[uint32]SimulcastTrackInfo) UnhandleSimulcastOption
type UpTrackManager ¶
type UpTrackManager struct {
// contains filtered or unexported fields
}
UpTrackManager manages all uptracks from a participant
func NewUpTrackManager ¶
func NewUpTrackManager(params UpTrackManagerParams) *UpTrackManager
func (*UpTrackManager) AddPublishedTrack ¶
func (u *UpTrackManager) AddPublishedTrack(track types.MediaTrack)
func (*UpTrackManager) Close ¶
func (u *UpTrackManager) Close(willBeResumed bool)
func (*UpTrackManager) DebugInfo ¶
func (u *UpTrackManager) DebugInfo() map[string]interface{}
func (*UpTrackManager) GetAudioLevel ¶
func (u *UpTrackManager) GetAudioLevel() (level float64, active bool)
func (*UpTrackManager) GetPublishedTrack ¶
func (u *UpTrackManager) GetPublishedTrack(trackID livekit.TrackID) types.MediaTrack
func (*UpTrackManager) GetPublishedTracks ¶
func (u *UpTrackManager) GetPublishedTracks() []types.MediaTrack
func (*UpTrackManager) HasPermission ¶
func (u *UpTrackManager) HasPermission(trackID livekit.TrackID, subIdentity livekit.ParticipantIdentity) bool
func (*UpTrackManager) OnPublishedTrackUpdated ¶
func (u *UpTrackManager) OnPublishedTrackUpdated(f func(track types.MediaTrack))
func (*UpTrackManager) OnUpTrackManagerClose ¶
func (u *UpTrackManager) OnUpTrackManagerClose(f func())
func (*UpTrackManager) RemovePublishedTrack ¶
func (u *UpTrackManager) RemovePublishedTrack(track types.MediaTrack, willBeResumed bool, shouldClose bool)
func (*UpTrackManager) SetPublishedTrackMuted ¶
func (u *UpTrackManager) SetPublishedTrackMuted(trackID livekit.TrackID, muted bool) types.MediaTrack
func (*UpTrackManager) SubscriptionPermission ¶
func (u *UpTrackManager) SubscriptionPermission() (*livekit.SubscriptionPermission, utils.TimedVersion)
func (*UpTrackManager) ToProto ¶
func (u *UpTrackManager) ToProto() []*livekit.TrackInfo
func (*UpTrackManager) UpdateSubscriptionPermission ¶
func (u *UpTrackManager) UpdateSubscriptionPermission( subscriptionPermission *livekit.SubscriptionPermission, timedVersion utils.TimedVersion, resolverBySid func(participantID livekit.ParticipantID) types.LocalParticipant, ) error
func (*UpTrackManager) UpdateVideoLayers ¶
func (u *UpTrackManager) UpdateVideoLayers(updateVideoLayers *livekit.UpdateVideoLayers) error
type UpTrackManagerParams ¶
type UpTrackManagerParams struct { SID livekit.ParticipantID Logger logger.Logger VersionGenerator utils.TimedVersionGenerator }
type WebRTCConfig ¶
type WebRTCConfig struct { rtcconfig.WebRTCConfig BufferFactory *buffer.Factory Receiver ReceiverConfig Publisher DirectionConfig Subscriber DirectionConfig }
func NewWebRTCConfig ¶
func NewWebRTCConfig(conf *config.Config) (*WebRTCConfig, error)
func (*WebRTCConfig) SetBufferFactory ¶
func (c *WebRTCConfig) SetBufferFactory(factory *buffer.Factory)
type WrappedReceiver ¶
type WrappedReceiver struct { sfu.TrackReceiver // contains filtered or unexported fields }
func NewWrappedReceiver ¶
func NewWrappedReceiver(params WrappedReceiverParams) *WrappedReceiver
func (*WrappedReceiver) Codecs ¶
func (r *WrappedReceiver) Codecs() []webrtc.RTPCodecParameters
func (*WrappedReceiver) DeleteDownTrack ¶
func (r *WrappedReceiver) DeleteDownTrack(participantID livekit.ParticipantID)
func (*WrappedReceiver) DetermineReceiver ¶
func (r *WrappedReceiver) DetermineReceiver(codec webrtc.RTPCodecCapability)
func (*WrappedReceiver) StreamID ¶
func (r *WrappedReceiver) StreamID() string
func (*WrappedReceiver) TrackID ¶
func (r *WrappedReceiver) TrackID() livekit.TrackID
Source Files ¶
- clientinfo.go
- config.go
- dynacastmanager.go
- dynacastquality.go
- egress.go
- errors.go
- mediaengine.go
- medialossproxy.go
- mediatrack.go
- mediatrackreceiver.go
- mediatracksubscriptions.go
- participant.go
- participant_sdp.go
- participant_signal.go
- participant_traffic_load.go
- room.go
- roomtrackmanager.go
- signalhandler.go
- subscribedtrack.go
- subscriptionmanager.go
- testutils.go
- transport.go
- transportmanager.go
- unhandlesimulcast.go
- uptrackmanager.go
- utils.go
- wrappedreceiver.go
Directories ¶
Path | Synopsis |
---|---|
transportfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
typesfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |