Documentation ¶
Index ¶
- Constants
- Variables
- 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 IsEOF(err error) bool
- 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) logger.Logger
- func PackDataTrackLabel(participantID livekit.ParticipantID, trackID livekit.TrackID, label string) string
- func PackStreamID(participantID livekit.ParticipantID, trackID livekit.TrackID) string
- func QualityForSpatialLayer(layer int32) livekit.VideoQuality
- func Recover()
- func RecoverSilent()
- func SpatialLayerForQuality(quality livekit.VideoQuality) int32
- func ToProtoParticipants(participants []types.LocalParticipant) []*livekit.ParticipantInfo
- 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) (peerID livekit.ParticipantID, trackID livekit.TrackID, label string)
- func UnpackStreamID(packed string) (participantID livekit.ParticipantID, trackID livekit.TrackID)
- func VideoQualityToRID(q livekit.VideoQuality) string
- type DirectionConfig
- type MediaTrack
- func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.TrackRemote, twcc *twcc.Responder)
- func (t *MediaTrack) GetConnectionScore() float32
- func (t *MediaTrack) SdpCid() string
- func (t *MediaTrack) SetRTT(rtt uint32)
- func (t *MediaTrack) SignalCid() string
- func (t *MediaTrack) ToProto() *livekit.TrackInfo
- func (t *MediaTrack) TrySetSimulcastSSRC(layer uint8, ssrc uint32)
- type MediaTrackParams
- type MediaTrackReceiver
- func (t *MediaTrackReceiver) AddOnClose(f func())
- func (t *MediaTrackReceiver) AddSubscriber(sub types.LocalParticipant) error
- func (t *MediaTrackReceiver) ClearReceiver()
- 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) GetVideoLayers() []*livekit.VideoLayer
- func (t *MediaTrackReceiver) ID() livekit.TrackID
- func (t *MediaTrackReceiver) IsMuted() bool
- func (t *MediaTrackReceiver) IsSimulcast() bool
- func (t *MediaTrackReceiver) Kind() livekit.TrackType
- func (t *MediaTrackReceiver) Name() string
- func (t *MediaTrackReceiver) NotifySubscriberNodeMediaLoss(_nodeID livekit.NodeID, fractionalLoss uint8)
- func (t *MediaTrackReceiver) OnMediaLossUpdate(f func(fractionalLoss uint8))
- func (t *MediaTrackReceiver) OnSubscribedMaxQualityChange(...)
- func (t *MediaTrackReceiver) OnVideoLayerUpdate(f func(layers []*livekit.VideoLayer))
- func (t *MediaTrackReceiver) PublisherID() livekit.ParticipantID
- func (t *MediaTrackReceiver) PublisherIdentity() livekit.ParticipantIdentity
- func (t *MediaTrackReceiver) Receiver() sfu.TrackReceiver
- func (t *MediaTrackReceiver) Restart()
- func (t *MediaTrackReceiver) SetMuted(muted bool)
- func (t *MediaTrackReceiver) SetSimulcast(simulcast bool)
- func (t *MediaTrackReceiver) SetupReceiver(receiver sfu.TrackReceiver)
- func (t *MediaTrackReceiver) Source() livekit.TrackSource
- func (t *MediaTrackReceiver) TrackInfo() *livekit.TrackInfo
- 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, codec webrtc.RTPCodecCapability, ...) (*sfu.DownTrack, error)
- func (t *MediaTrackSubscriptions) Close()
- func (t *MediaTrackSubscriptions) DebugInfo() []map[string]interface{}
- func (t *MediaTrackSubscriptions) GetAllSubscribers() []livekit.ParticipantID
- func (t *MediaTrackSubscriptions) IsSubscriber(subID livekit.ParticipantID) bool
- func (t *MediaTrackSubscriptions) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, quality livekit.VideoQuality)
- func (t *MediaTrackSubscriptions) OnNoSubscribers(f func())
- func (t *MediaTrackSubscriptions) OnSubscribedMaxQualityChange(f func(subscribedQualities []*livekit.SubscribedQuality, ...))
- func (t *MediaTrackSubscriptions) RemoveAllSubscribers()
- func (t *MediaTrackSubscriptions) RemoveSubscriber(participantID livekit.ParticipantID, resume bool)
- func (t *MediaTrackSubscriptions) Restart()
- func (t *MediaTrackSubscriptions) ResyncAllSubscribers()
- func (t *MediaTrackSubscriptions) RevokeDisallowedSubscribers(allowedSubscriberIDs []livekit.ParticipantID) []livekit.ParticipantID
- func (t *MediaTrackSubscriptions) SetMuted(muted bool)
- func (t *MediaTrackSubscriptions) Start()
- func (t *MediaTrackSubscriptions) UpdateQualityChange(force bool)
- func (t *MediaTrackSubscriptions) UpdateVideoLayers()
- type MediaTrackSubscriptionsParams
- type PCTransport
- func (t *PCTransport) AddICECandidate(candidate webrtc.ICECandidateInit) error
- func (t *PCTransport) AddTrack(subTrack types.SubscribedTrack)
- func (t *PCTransport) Close()
- func (t *PCTransport) CreateAndSendOffer(options *webrtc.OfferOptions) error
- func (t *PCTransport) IsEstablished() bool
- func (t *PCTransport) Negotiate()
- func (t *PCTransport) OnOffer(f func(sd webrtc.SessionDescription))
- func (t *PCTransport) OnStreamStateChange(f func(update *sfu.StreamStateUpdate) error)
- func (t *PCTransport) PeerConnection() *webrtc.PeerConnection
- func (t *PCTransport) RemoveTrack(subTrack types.SubscribedTrack)
- func (t *PCTransport) SetPreviousAnswer(answer *webrtc.SessionDescription)
- func (t *PCTransport) SetRemoteDescription(sd webrtc.SessionDescription) error
- type ParticipantImpl
- func (p *ParticipantImpl) AddICECandidate(candidate webrtc.ICECandidateInit, target livekit.SignalTarget) error
- func (p *ParticipantImpl) AddSubscribedTrack(subTrack types.SubscribedTrack)
- func (p *ParticipantImpl) AddTrack(req *livekit.AddTrackRequest)
- func (p *ParticipantImpl) CanPublish() bool
- func (p *ParticipantImpl) CanPublishData() bool
- func (p *ParticipantImpl) CanSubscribe() bool
- func (p *ParticipantImpl) ClaimGrants() *auth.ClaimGrants
- func (p *ParticipantImpl) Close(sendLeave bool) error
- func (p *ParticipantImpl) ConnectedAt() time.Time
- func (p *ParticipantImpl) DebugInfo() map[string]interface{}
- func (p *ParticipantImpl) GetAdaptiveStream() bool
- func (p *ParticipantImpl) GetAudioLevel() (level float64, active bool)
- func (p *ParticipantImpl) GetConnectionQuality() *livekit.ConnectionQualityInfo
- func (p *ParticipantImpl) GetLogger() logger.Logger
- func (p *ParticipantImpl) GetResponseSink() routing.MessageSink
- func (p *ParticipantImpl) GetSubscribedParticipants() []livekit.ParticipantID
- func (p *ParticipantImpl) GetSubscribedTracks() []types.SubscribedTrack
- func (p *ParticipantImpl) HandleAnswer(sdp webrtc.SessionDescription) error
- func (p *ParticipantImpl) HandleOffer(sdp webrtc.SessionDescription) (answer webrtc.SessionDescription, err error)
- func (p *ParticipantImpl) Hidden() bool
- func (p *ParticipantImpl) ICERestart() error
- func (p *ParticipantImpl) ID() livekit.ParticipantID
- func (p *ParticipantImpl) Identity() livekit.ParticipantIdentity
- func (p *ParticipantImpl) IsReady() bool
- func (p *ParticipantImpl) IsRecorder() bool
- func (p *ParticipantImpl) MigrateState() types.MigrateState
- func (p *ParticipantImpl) Negotiate()
- func (p *ParticipantImpl) OnClaimsChanged(callback func(types.LocalParticipant))
- func (p *ParticipantImpl) OnClose(...)
- func (p *ParticipantImpl) OnDataPacket(callback func(types.LocalParticipant, *livekit.DataPacket))
- func (p *ParticipantImpl) OnParticipantUpdate(callback func(types.LocalParticipant))
- func (p *ParticipantImpl) OnStateChange(...)
- func (p *ParticipantImpl) OnTrackPublished(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) RemoveSubscribedTrack(subTrack types.SubscribedTrack)
- func (p *ParticipantImpl) SendConnectionQualityUpdate(update *livekit.ConnectionQualityUpdate) error
- func (p *ParticipantImpl) SendDataPacket(dp *livekit.DataPacket) error
- func (p *ParticipantImpl) SendJoinResponse(roomInfo *livekit.Room, otherParticipants []*livekit.ParticipantInfo, ...) 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) error
- func (p *ParticipantImpl) SetMetadata(metadata string)
- func (p *ParticipantImpl) SetMigrateInfo(previousAnswer *webrtc.SessionDescription, ...)
- func (p *ParticipantImpl) SetMigrateState(s types.MigrateState)
- 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)
- func (p *ParticipantImpl) Start()
- func (p *ParticipantImpl) State() livekit.ParticipantInfo_State
- func (p *ParticipantImpl) SubscriberAsPrimary() bool
- func (p *ParticipantImpl) SubscriberMediaEngine() *webrtc.MediaEngine
- func (p *ParticipantImpl) SubscriberPC() *webrtc.PeerConnection
- func (p *ParticipantImpl) SubscriptionPermissionUpdate(publisherID livekit.ParticipantID, trackID livekit.TrackID, allowed bool)
- func (p *ParticipantImpl) ToProto() *livekit.ParticipantInfo
- func (p *ParticipantImpl) UpdateRTT(rtt uint32)
- func (p *ParticipantImpl) UpdateSubscribedTrackSettings(trackID livekit.TrackID, settings *livekit.UpdateTrackSettings) error
- type ParticipantOptions
- type ParticipantParams
- type RTCPFeedbackConfig
- type RTPHeaderExtensionConfig
- type ReceiverConfig
- type Room
- func (r *Room) Close()
- 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) GetParticipant(identity livekit.ParticipantIdentity) types.LocalParticipant
- func (r *Room) GetParticipantBySid(participantID livekit.ParticipantID) types.LocalParticipant
- func (r *Room) GetParticipants() []types.LocalParticipant
- func (r *Room) Hold() bool
- func (r *Room) ID() livekit.RoomID
- func (r *Room) IsClosed() bool
- func (r *Room) Join(participant types.LocalParticipant, opts *ParticipantOptions, ...) error
- func (r *Room) LastLeftAt() int64
- func (r *Room) Name() livekit.RoomName
- func (r *Room) OnClose(f func())
- func (r *Room) OnMetadataUpdate(f func(metadata string))
- func (r *Room) OnParticipantChanged(f func(participant types.LocalParticipant))
- func (r *Room) Release()
- func (r *Room) RemoveDisallowedSubscriptions(sub types.LocalParticipant, ...)
- func (r *Room) RemoveParticipant(identity livekit.ParticipantIdentity)
- func (r *Room) ResumeParticipant(p types.LocalParticipant, responseSink routing.MessageSink) error
- func (r *Room) SendDataPacket(up *livekit.UserPacket, kind livekit.DataPacket_Kind)
- func (r *Room) SetMetadata(metadata string)
- func (r *Room) SetParticipantPermission(participant types.LocalParticipant, permission *livekit.ParticipantPermission) error
- 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) UpdateSubscriptionPermission(participant types.LocalParticipant, ...) error
- func (r *Room) UpdateSubscriptions(participant types.LocalParticipant, trackIDs []livekit.TrackID, ...) error
- func (r *Room) UpdateVideoLayers(participant types.Participant, updateVideoLayers *livekit.UpdateVideoLayers) error
- type SimulcastTrackInfo
- type SubscribedTrack
- func (t *SubscribedTrack) Bound()
- func (t *SubscribedTrack) DownTrack() *sfu.DownTrack
- func (t *SubscribedTrack) ID() livekit.TrackID
- func (t *SubscribedTrack) IsMuted() bool
- func (t *SubscribedTrack) MediaTrack() types.MediaTrack
- func (t *SubscribedTrack) OnBind(f func())
- func (t *SubscribedTrack) PublisherID() livekit.ParticipantID
- func (t *SubscribedTrack) PublisherIdentity() livekit.ParticipantIdentity
- func (t *SubscribedTrack) SetPublisherMuted(muted bool)
- func (t *SubscribedTrack) SubscriberID() livekit.ParticipantID
- func (t *SubscribedTrack) UpdateSubscriberSettings(settings *livekit.UpdateTrackSettings)
- func (t *SubscribedTrack) UpdateVideoLayer()
- type SubscribedTrackParams
- type TransportParams
- type UnhandleSimulcastInterceptor
- type UnhandleSimulcastInterceptorFactory
- type UnhandleSimulcastOption
- type UpTrackManager
- func (u *UpTrackManager) AddPublishedTrack(track types.MediaTrack)
- func (u *UpTrackManager) AddSubscriber(sub types.LocalParticipant, params types.AddSubscriberParams) (int, error)
- func (u *UpTrackManager) Close()
- func (u *UpTrackManager) DebugInfo() map[string]interface{}
- func (u *UpTrackManager) GetPublishedTrack(trackID livekit.TrackID) types.MediaTrack
- func (u *UpTrackManager) GetPublishedTracks() []types.MediaTrack
- func (u *UpTrackManager) OnPublishedTrackUpdated(f func(track types.MediaTrack, onlyIfReady bool))
- func (u *UpTrackManager) OnUpTrackManagerClose(f func())
- func (u *UpTrackManager) RemovePublishedTrack(track types.MediaTrack)
- func (u *UpTrackManager) RemoveSubscriber(sub types.LocalParticipant, trackID livekit.TrackID, resume bool)
- func (u *UpTrackManager) Restart()
- func (u *UpTrackManager) SetPublishedTrackMuted(trackID livekit.TrackID, muted bool) types.MediaTrack
- func (u *UpTrackManager) Start()
- func (u *UpTrackManager) SubscriptionPermission() *livekit.SubscriptionPermission
- func (u *UpTrackManager) ToProto() []*livekit.TrackInfo
- func (u *UpTrackManager) UpdateMediaLoss(nodeID livekit.NodeID, trackID livekit.TrackID, fractionalLoss uint32) error
- func (u *UpTrackManager) UpdateSubscribedQuality(nodeID livekit.NodeID, trackID livekit.TrackID, ...) error
- func (u *UpTrackManager) UpdateSubscriptionPermission(subscriptionPermission *livekit.SubscriptionPermission, ...) error
- func (u *UpTrackManager) UpdateVideoLayers(updateVideoLayers *livekit.UpdateVideoLayers) error
- type UpTrackManagerParams
- type WebRTCConfig
- type WrappedReceiver
Constants ¶
const ( LossyDataChannel = "_lossy" ReliableDataChannel = "_reliable" )
const ( DefaultEmptyTimeout = 5 * 60 // 5m DefaultRoomDepartureGrace = 20 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") ErrUnexpectedOffer = errors.New("expected answer SDP, received offer") ErrCannotSubscribe = errors.New("participant does not have permission to subscribe") ErrEmptyIdentity = errors.New("participant identity cannot be empty") ErrEmptyParticipantID = errors.New("participant ID cannot be empty") ErrMissingGrants = errors.New("VideoGrant is missing") )
Functions ¶
func FromProtoSessionDescription ¶
func FromProtoSessionDescription(sd *livekit.SessionDescription) webrtc.SessionDescription
func FromProtoTrickle ¶
func FromProtoTrickle(trickle *livekit.TrickleRequest) (webrtc.ICECandidateInit, error)
func HandleParticipantSignal ¶ added in v0.15.0
func HandleParticipantSignal(room types.Room, participant types.LocalParticipant, req *livekit.SignalRequest, pLogger logger.Logger) error
func LoggerWithPCTarget ¶ added in v0.15.6
func LoggerWithParticipant ¶ added in v0.15.0
func LoggerWithParticipant(l logger.Logger, identity livekit.ParticipantIdentity, sid livekit.ParticipantID) logger.Logger
logger helpers
func LoggerWithRoom ¶ added in v0.15.0
func LoggerWithTrack ¶ added in v0.15.3
func PackDataTrackLabel ¶
func PackStreamID ¶
func PackStreamID(participantID livekit.ParticipantID, trackID livekit.TrackID) string
func QualityForSpatialLayer ¶ added in v0.15.4
func QualityForSpatialLayer(layer int32) livekit.VideoQuality
func RecoverSilent ¶
func RecoverSilent()
func SpatialLayerForQuality ¶ added in v0.15.2
func SpatialLayerForQuality(quality livekit.VideoQuality) int32
func ToProtoParticipants ¶
func ToProtoParticipants(participants []types.LocalParticipant) []*livekit.ParticipantInfo
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)
func VideoQualityToRID ¶ added in v0.15.3
func VideoQualityToRID(q livekit.VideoQuality) string
Types ¶
type DirectionConfig ¶ added in v0.15.2
type DirectionConfig struct { RTPHeaderExtension RTPHeaderExtensionConfig RTCPFeedback RTCPFeedbackConfig }
type MediaTrack ¶
type MediaTrack struct { *MediaTrackReceiver // 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) *MediaTrack
func (*MediaTrack) AddReceiver ¶
func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.TrackRemote, twcc *twcc.Responder)
AddReceiver adds a new RTP receiver to the track
func (*MediaTrack) GetConnectionScore ¶ added in v0.15.0
func (t *MediaTrack) GetConnectionScore() float32
func (*MediaTrack) SdpCid ¶ added in v0.13.6
func (t *MediaTrack) SdpCid() string
func (*MediaTrack) SetRTT ¶ added in v0.15.4
func (t *MediaTrack) SetRTT(rtt uint32)
func (*MediaTrack) SignalCid ¶ added in v0.13.6
func (t *MediaTrack) SignalCid() string
func (*MediaTrack) ToProto ¶ added in v0.9.13
func (t *MediaTrack) ToProto() *livekit.TrackInfo
func (*MediaTrack) TrySetSimulcastSSRC ¶ added in v0.15.3
func (t *MediaTrack) TrySetSimulcastSSRC(layer uint8, ssrc uint32)
type MediaTrackParams ¶
type MediaTrackParams struct { TrackInfo *livekit.TrackInfo SignalCid string SdpCid string ParticipantID livekit.ParticipantID ParticipantIdentity livekit.ParticipantIdentity // channel to send RTCP packets to the source RTCPChan chan []rtcp.Packet BufferFactory *buffer.Factory ReceiverConfig ReceiverConfig SubscriberConfig DirectionConfig PLIThrottleConfig config.PLIThrottleConfig AudioConfig config.AudioConfig VideoConfig config.VideoConfig Telemetry telemetry.TelemetryService Logger logger.Logger }
type MediaTrackReceiver ¶ added in v0.15.3
type MediaTrackReceiver struct { *MediaTrackSubscriptions // contains filtered or unexported fields }
func NewMediaTrackReceiver ¶ added in v0.15.3
func NewMediaTrackReceiver(params MediaTrackReceiverParams) *MediaTrackReceiver
func (*MediaTrackReceiver) AddOnClose ¶ added in v0.15.3
func (t *MediaTrackReceiver) AddOnClose(f func())
func (*MediaTrackReceiver) AddSubscriber ¶ added in v0.15.3
func (t *MediaTrackReceiver) AddSubscriber(sub types.LocalParticipant) error
AddSubscriber subscribes sub to current mediaTrack
func (*MediaTrackReceiver) ClearReceiver ¶ added in v0.15.3
func (t *MediaTrackReceiver) ClearReceiver()
func (*MediaTrackReceiver) Close ¶ added in v0.15.3
func (t *MediaTrackReceiver) Close()
func (*MediaTrackReceiver) DebugInfo ¶ added in v0.15.3
func (t *MediaTrackReceiver) DebugInfo() map[string]interface{}
func (*MediaTrackReceiver) GetAudioLevel ¶ added in v0.15.7
func (t *MediaTrackReceiver) GetAudioLevel() (float64, bool)
func (*MediaTrackReceiver) GetQualityForDimension ¶ added in v0.15.3
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) GetVideoLayers ¶ added in v0.15.3
func (t *MediaTrackReceiver) GetVideoLayers() []*livekit.VideoLayer
func (*MediaTrackReceiver) ID ¶ added in v0.15.3
func (t *MediaTrackReceiver) ID() livekit.TrackID
func (*MediaTrackReceiver) IsMuted ¶ added in v0.15.3
func (t *MediaTrackReceiver) IsMuted() bool
func (*MediaTrackReceiver) IsSimulcast ¶ added in v0.15.3
func (t *MediaTrackReceiver) IsSimulcast() bool
func (*MediaTrackReceiver) Kind ¶ added in v0.15.3
func (t *MediaTrackReceiver) Kind() livekit.TrackType
func (*MediaTrackReceiver) Name ¶ added in v0.15.3
func (t *MediaTrackReceiver) Name() string
func (*MediaTrackReceiver) NotifySubscriberNodeMediaLoss ¶ added in v0.15.3
func (t *MediaTrackReceiver) NotifySubscriberNodeMediaLoss(_nodeID livekit.NodeID, fractionalLoss uint8)
func (*MediaTrackReceiver) OnMediaLossUpdate ¶ added in v0.15.3
func (t *MediaTrackReceiver) OnMediaLossUpdate(f func(fractionalLoss uint8))
func (*MediaTrackReceiver) OnSubscribedMaxQualityChange ¶ added in v0.15.3
func (t *MediaTrackReceiver) OnSubscribedMaxQualityChange(f func(trackID livekit.TrackID, subscribedQualities []*livekit.SubscribedQuality, maxSubscribedQuality livekit.VideoQuality) error)
func (*MediaTrackReceiver) OnVideoLayerUpdate ¶ added in v0.15.3
func (t *MediaTrackReceiver) OnVideoLayerUpdate(f func(layers []*livekit.VideoLayer))
func (*MediaTrackReceiver) PublisherID ¶ added in v0.15.3
func (t *MediaTrackReceiver) PublisherID() livekit.ParticipantID
func (*MediaTrackReceiver) PublisherIdentity ¶ added in v0.15.3
func (t *MediaTrackReceiver) PublisherIdentity() livekit.ParticipantIdentity
func (*MediaTrackReceiver) Receiver ¶ added in v0.15.3
func (t *MediaTrackReceiver) Receiver() sfu.TrackReceiver
func (*MediaTrackReceiver) Restart ¶ added in v0.15.7
func (t *MediaTrackReceiver) Restart()
func (*MediaTrackReceiver) SetMuted ¶ added in v0.15.3
func (t *MediaTrackReceiver) SetMuted(muted bool)
func (*MediaTrackReceiver) SetSimulcast ¶ added in v0.15.3
func (t *MediaTrackReceiver) SetSimulcast(simulcast bool)
func (*MediaTrackReceiver) SetupReceiver ¶ added in v0.15.3
func (t *MediaTrackReceiver) SetupReceiver(receiver sfu.TrackReceiver)
func (*MediaTrackReceiver) Source ¶ added in v0.15.3
func (t *MediaTrackReceiver) Source() livekit.TrackSource
func (*MediaTrackReceiver) TrackInfo ¶ added in v0.15.3
func (t *MediaTrackReceiver) TrackInfo() *livekit.TrackInfo
func (*MediaTrackReceiver) UpdateTrackInfo ¶ added in v0.15.3
func (t *MediaTrackReceiver) UpdateTrackInfo(ti *livekit.TrackInfo)
func (*MediaTrackReceiver) UpdateVideoLayers ¶ added in v0.15.3
func (t *MediaTrackReceiver) UpdateVideoLayers(layers []*livekit.VideoLayer)
type MediaTrackReceiverParams ¶ added in v0.15.3
type MediaTrackReceiverParams struct { TrackInfo *livekit.TrackInfo MediaTrack types.MediaTrack ParticipantID livekit.ParticipantID ParticipantIdentity livekit.ParticipantIdentity BufferFactory *buffer.Factory ReceiverConfig ReceiverConfig SubscriberConfig DirectionConfig VideoConfig config.VideoConfig Telemetry telemetry.TelemetryService Logger logger.Logger }
type MediaTrackSubscriptions ¶ added in v0.15.3
type MediaTrackSubscriptions struct {
// contains filtered or unexported fields
}
MediaTrackSubscriptions manages subscriptions of a media track
func NewMediaTrackSubscriptions ¶ added in v0.15.3
func NewMediaTrackSubscriptions(params MediaTrackSubscriptionsParams) *MediaTrackSubscriptions
func (*MediaTrackSubscriptions) AddSubscriber ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, codec webrtc.RTPCodecCapability, wr WrappedReceiver) (*sfu.DownTrack, error)
AddSubscriber subscribes sub to current mediaTrack
func (*MediaTrackSubscriptions) Close ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) Close()
func (*MediaTrackSubscriptions) DebugInfo ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) DebugInfo() []map[string]interface{}
func (*MediaTrackSubscriptions) GetAllSubscribers ¶ added in v0.15.6
func (t *MediaTrackSubscriptions) GetAllSubscribers() []livekit.ParticipantID
func (*MediaTrackSubscriptions) IsSubscriber ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) IsSubscriber(subID livekit.ParticipantID) bool
func (*MediaTrackSubscriptions) NotifySubscriberNodeMaxQuality ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, quality livekit.VideoQuality)
func (*MediaTrackSubscriptions) OnNoSubscribers ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) OnNoSubscribers(f func())
func (*MediaTrackSubscriptions) OnSubscribedMaxQualityChange ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) OnSubscribedMaxQualityChange(f func(subscribedQualities []*livekit.SubscribedQuality, maxSubscribedQuality livekit.VideoQuality))
func (*MediaTrackSubscriptions) RemoveAllSubscribers ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) RemoveAllSubscribers()
func (*MediaTrackSubscriptions) RemoveSubscriber ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) RemoveSubscriber(participantID livekit.ParticipantID, resume bool)
RemoveSubscriber removes participant from subscription stop all forwarders to the client
func (*MediaTrackSubscriptions) Restart ¶ added in v0.15.7
func (t *MediaTrackSubscriptions) Restart()
func (*MediaTrackSubscriptions) ResyncAllSubscribers ¶ added in v0.15.4
func (t *MediaTrackSubscriptions) ResyncAllSubscribers()
func (*MediaTrackSubscriptions) RevokeDisallowedSubscribers ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) RevokeDisallowedSubscribers(allowedSubscriberIDs []livekit.ParticipantID) []livekit.ParticipantID
func (*MediaTrackSubscriptions) SetMuted ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) SetMuted(muted bool)
func (*MediaTrackSubscriptions) Start ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) Start()
func (*MediaTrackSubscriptions) UpdateQualityChange ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) UpdateQualityChange(force bool)
func (*MediaTrackSubscriptions) UpdateVideoLayers ¶ added in v0.15.3
func (t *MediaTrackSubscriptions) UpdateVideoLayers()
type MediaTrackSubscriptionsParams ¶ added in v0.15.3
type MediaTrackSubscriptionsParams struct { MediaTrack types.MediaTrack BufferFactory *buffer.Factory ReceiverConfig ReceiverConfig SubscriberConfig DirectionConfig VideoConfig config.VideoConfig 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) error
func (*PCTransport) AddTrack ¶ added in v0.15.0
func (t *PCTransport) AddTrack(subTrack types.SubscribedTrack)
func (*PCTransport) Close ¶
func (t *PCTransport) Close()
func (*PCTransport) CreateAndSendOffer ¶
func (t *PCTransport) CreateAndSendOffer(options *webrtc.OfferOptions) error
func (*PCTransport) IsEstablished ¶ added in v0.15.7
func (t *PCTransport) IsEstablished() bool
IsEstablished returns true if the PeerConnection has been established
func (*PCTransport) Negotiate ¶
func (t *PCTransport) Negotiate()
func (*PCTransport) OnOffer ¶
func (t *PCTransport) OnOffer(f func(sd webrtc.SessionDescription))
OnOffer is called when the PeerConnection starts negotiation and prepares an offer
func (*PCTransport) OnStreamStateChange ¶ added in v0.15.0
func (t *PCTransport) OnStreamStateChange(f func(update *sfu.StreamStateUpdate) error)
func (*PCTransport) PeerConnection ¶
func (t *PCTransport) PeerConnection() *webrtc.PeerConnection
func (*PCTransport) RemoveTrack ¶ added in v0.15.0
func (t *PCTransport) RemoveTrack(subTrack types.SubscribedTrack)
func (*PCTransport) SetPreviousAnswer ¶ added in v0.15.3
func (t *PCTransport) SetPreviousAnswer(answer *webrtc.SessionDescription)
func (*PCTransport) SetRemoteDescription ¶
func (t *PCTransport) SetRemoteDescription(sd webrtc.SessionDescription) error
type ParticipantImpl ¶
type ParticipantImpl struct { *UpTrackManager // contains filtered or unexported fields }
func NewParticipant ¶
func NewParticipant(params ParticipantParams) (*ParticipantImpl, error)
func (*ParticipantImpl) AddICECandidate ¶
func (p *ParticipantImpl) AddICECandidate(candidate webrtc.ICECandidateInit, target livekit.SignalTarget) error
AddICECandidate adds candidates for remote peer
func (*ParticipantImpl) AddSubscribedTrack ¶
func (p *ParticipantImpl) AddSubscribedTrack(subTrack types.SubscribedTrack)
AddSubscribedTrack adds a track to the participant's subscribed list
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) CanPublish ¶
func (p *ParticipantImpl) CanPublish() bool
func (*ParticipantImpl) CanPublishData ¶ added in v0.12.2
func (p *ParticipantImpl) CanPublishData() bool
func (*ParticipantImpl) CanSubscribe ¶
func (p *ParticipantImpl) CanSubscribe() bool
func (*ParticipantImpl) ClaimGrants ¶ added in v0.15.3
func (p *ParticipantImpl) ClaimGrants() *auth.ClaimGrants
func (*ParticipantImpl) Close ¶
func (p *ParticipantImpl) Close(sendLeave bool) error
func (*ParticipantImpl) ConnectedAt ¶
func (p *ParticipantImpl) ConnectedAt() time.Time
func (*ParticipantImpl) DebugInfo ¶ added in v0.10.6
func (p *ParticipantImpl) DebugInfo() map[string]interface{}
func (*ParticipantImpl) GetAdaptiveStream ¶ added in v0.15.7
func (p *ParticipantImpl) GetAdaptiveStream() bool
func (*ParticipantImpl) GetAudioLevel ¶
func (p *ParticipantImpl) GetAudioLevel() (level float64, active bool)
func (*ParticipantImpl) GetConnectionQuality ¶ added in v0.14.0
func (p *ParticipantImpl) GetConnectionQuality() *livekit.ConnectionQualityInfo
func (*ParticipantImpl) GetLogger ¶ added in v0.15.4
func (p *ParticipantImpl) GetLogger() logger.Logger
func (*ParticipantImpl) GetResponseSink ¶
func (p *ParticipantImpl) GetResponseSink() routing.MessageSink
func (*ParticipantImpl) GetSubscribedParticipants ¶ added in v0.14.0
func (p *ParticipantImpl) GetSubscribedParticipants() []livekit.ParticipantID
func (*ParticipantImpl) GetSubscribedTracks ¶
func (p *ParticipantImpl) GetSubscribedTracks() []types.SubscribedTrack
func (*ParticipantImpl) HandleAnswer ¶
func (p *ParticipantImpl) HandleAnswer(sdp webrtc.SessionDescription) error
HandleAnswer handles a client answer response, with subscriber PC, server initiates the offer and client answers
func (*ParticipantImpl) HandleOffer ¶
func (p *ParticipantImpl) HandleOffer(sdp webrtc.SessionDescription) (answer webrtc.SessionDescription, err error)
HandleOffer an offer from remote participant, used when clients make the initial connection
func (*ParticipantImpl) Hidden ¶ added in v0.11.1
func (p *ParticipantImpl) Hidden() bool
func (*ParticipantImpl) ICERestart ¶
func (p *ParticipantImpl) ICERestart() error
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) IsReady ¶
func (p *ParticipantImpl) IsReady() bool
func (*ParticipantImpl) IsRecorder ¶ added in v0.15.0
func (p *ParticipantImpl) IsRecorder() bool
func (*ParticipantImpl) MigrateState ¶ added in v0.15.3
func (p *ParticipantImpl) MigrateState() types.MigrateState
func (*ParticipantImpl) Negotiate ¶
func (p *ParticipantImpl) Negotiate()
func (*ParticipantImpl) OnClaimsChanged ¶ added in v0.15.3
func (p *ParticipantImpl) OnClaimsChanged(callback func(types.LocalParticipant))
func (*ParticipantImpl) OnClose ¶
func (p *ParticipantImpl) OnClose(callback func(types.LocalParticipant, map[livekit.TrackID]livekit.ParticipantID))
func (*ParticipantImpl) OnDataPacket ¶
func (p *ParticipantImpl) OnDataPacket(callback func(types.LocalParticipant, *livekit.DataPacket))
func (*ParticipantImpl) OnParticipantUpdate ¶ added in v0.15.6
func (p *ParticipantImpl) OnParticipantUpdate(callback func(types.LocalParticipant))
func (*ParticipantImpl) OnStateChange ¶
func (p *ParticipantImpl) OnStateChange(callback func(p types.LocalParticipant, oldState livekit.ParticipantInfo_State))
func (*ParticipantImpl) OnTrackPublished ¶
func (p *ParticipantImpl) OnTrackPublished(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) RemoveSubscribedTrack ¶
func (p *ParticipantImpl) RemoveSubscribedTrack(subTrack types.SubscribedTrack)
RemoveSubscribedTrack removes a track to the participant's subscribed list
func (*ParticipantImpl) SendConnectionQualityUpdate ¶ added in v0.14.0
func (p *ParticipantImpl) SendConnectionQualityUpdate(update *livekit.ConnectionQualityUpdate) error
func (*ParticipantImpl) SendDataPacket ¶
func (p *ParticipantImpl) SendDataPacket(dp *livekit.DataPacket) error
func (*ParticipantImpl) SendJoinResponse ¶
func (p *ParticipantImpl) SendJoinResponse( roomInfo *livekit.Room, otherParticipants []*livekit.ParticipantInfo, iceServers []*livekit.ICEServer, region string, ) error
func (*ParticipantImpl) SendParticipantUpdate ¶
func (p *ParticipantImpl) SendParticipantUpdate(participantsToUpdate []*livekit.ParticipantInfo) error
func (*ParticipantImpl) SendRefreshToken ¶ added in v0.15.3
func (p *ParticipantImpl) SendRefreshToken(token string) error
func (*ParticipantImpl) SendRoomUpdate ¶ added in v0.13.1
func (p *ParticipantImpl) SendRoomUpdate(room *livekit.Room) error
func (*ParticipantImpl) SendSpeakerUpdate ¶ added in v0.13.0
func (p *ParticipantImpl) SendSpeakerUpdate(speakers []*livekit.SpeakerInfo) 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 ¶ added in v0.15.5
func (p *ParticipantImpl) SetMigrateInfo(previousAnswer *webrtc.SessionDescription, mediaTracks []*livekit.TrackPublishedResponse, dataChannels []*livekit.DataChannelInfo)
func (*ParticipantImpl) SetMigrateState ¶ added in v0.15.3
func (p *ParticipantImpl) SetMigrateState(s types.MigrateState)
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 (p *ParticipantImpl) SetTrackMuted(trackID livekit.TrackID, muted bool, fromAdmin bool)
func (*ParticipantImpl) Start ¶
func (p *ParticipantImpl) Start()
func (*ParticipantImpl) State ¶
func (p *ParticipantImpl) State() livekit.ParticipantInfo_State
func (*ParticipantImpl) SubscriberAsPrimary ¶ added in v0.15.0
func (p *ParticipantImpl) SubscriberAsPrimary() bool
func (*ParticipantImpl) SubscriberMediaEngine ¶
func (p *ParticipantImpl) SubscriberMediaEngine() *webrtc.MediaEngine
func (*ParticipantImpl) SubscriberPC ¶
func (p *ParticipantImpl) SubscriberPC() *webrtc.PeerConnection
func (*ParticipantImpl) SubscriptionPermissionUpdate ¶ added in v0.15.2
func (p *ParticipantImpl) SubscriptionPermissionUpdate(publisherID livekit.ParticipantID, trackID livekit.TrackID, allowed bool)
func (*ParticipantImpl) ToProto ¶
func (p *ParticipantImpl) ToProto() *livekit.ParticipantInfo
func (*ParticipantImpl) UpdateRTT ¶ added in v0.15.4
func (p *ParticipantImpl) UpdateRTT(rtt uint32)
func (*ParticipantImpl) UpdateSubscribedTrackSettings ¶ added in v0.15.3
func (p *ParticipantImpl) UpdateSubscribedTrackSettings(trackID livekit.TrackID, settings *livekit.UpdateTrackSettings) error
type ParticipantOptions ¶ added in v0.9.4
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 Telemetry telemetry.TelemetryService PLIThrottleConfig config.PLIThrottleConfig CongestionControlConfig config.CongestionControlConfig EnabledCodecs []*livekit.Codec Logger logger.Logger SimTracks map[uint32]SimulcastTrackInfo Grants *auth.ClaimGrants InitialVersion uint32 ClientConf *livekit.ClientConfiguration Region string Migration bool AdaptiveStream bool }
type RTCPFeedbackConfig ¶ added in v0.15.2
type RTCPFeedbackConfig struct { Audio []webrtc.RTCPFeedback Video []webrtc.RTCPFeedback }
type RTPHeaderExtensionConfig ¶ added in v0.15.2
type ReceiverConfig ¶
type ReceiverConfig struct {
PacketBufferSize int
}
type Room ¶
type Room struct { Room *livekit.Room Logger logger.Logger // contains filtered or unexported fields }
func NewRoom ¶
func NewRoom(room *livekit.Room, config WebRTCConfig, audioConfig *config.AudioConfig, telemetry telemetry.TelemetryService) *Room
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 ¶ added in v0.15.2
func (*Room) GetParticipant ¶
func (r *Room) GetParticipant(identity livekit.ParticipantIdentity) types.LocalParticipant
func (*Room) GetParticipantBySid ¶ added in v0.15.2
func (r *Room) GetParticipantBySid(participantID livekit.ParticipantID) types.LocalParticipant
func (*Room) GetParticipants ¶
func (r *Room) GetParticipants() []types.LocalParticipant
func (*Room) Join ¶
func (r *Room) Join(participant types.LocalParticipant, opts *ParticipantOptions, iceServers []*livekit.ICEServer, region string) error
func (*Room) LastLeftAt ¶
func (*Room) OnMetadataUpdate ¶ added in v0.13.1
func (*Room) OnParticipantChanged ¶
func (r *Room) OnParticipantChanged(f func(participant types.LocalParticipant))
func (*Room) RemoveDisallowedSubscriptions ¶ added in v0.15.2
func (r *Room) RemoveDisallowedSubscriptions(sub types.LocalParticipant, disallowedSubscriptions map[livekit.TrackID]livekit.ParticipantID)
func (*Room) RemoveParticipant ¶
func (r *Room) RemoveParticipant(identity livekit.ParticipantIdentity)
func (*Room) ResumeParticipant ¶ added in v0.13.7
func (r *Room) ResumeParticipant(p types.LocalParticipant, responseSink routing.MessageSink) error
func (*Room) SendDataPacket ¶ added in v0.12.2
func (r *Room) SendDataPacket(up *livekit.UserPacket, kind livekit.DataPacket_Kind)
func (*Room) SetMetadata ¶ added in v0.13.1
func (*Room) SetParticipantPermission ¶ added in v0.15.3
func (r *Room) SetParticipantPermission(participant types.LocalParticipant, permission *livekit.ParticipantPermission) error
func (*Room) SimulateScenario ¶ added in v0.15.3
func (r *Room) SimulateScenario(participant types.LocalParticipant, simulateScenario *livekit.SimulateScenario) error
func (*Room) UpdateSubscriptionPermission ¶ added in v0.15.3
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, ) error
func (*Room) UpdateVideoLayers ¶ added in v0.15.3
func (r *Room) UpdateVideoLayers(participant types.Participant, updateVideoLayers *livekit.UpdateVideoLayers) error
type SimulcastTrackInfo ¶ added in v0.15.3
type SubscribedTrack ¶
type SubscribedTrack struct {
// contains filtered or unexported fields
}
func NewSubscribedTrack ¶
func NewSubscribedTrack(params SubscribedTrackParams) *SubscribedTrack
func (*SubscribedTrack) Bound ¶ added in v0.15.0
func (t *SubscribedTrack) Bound()
func (*SubscribedTrack) DownTrack ¶
func (t *SubscribedTrack) DownTrack() *sfu.DownTrack
func (*SubscribedTrack) ID ¶
func (t *SubscribedTrack) ID() livekit.TrackID
func (*SubscribedTrack) IsMuted ¶
func (t *SubscribedTrack) IsMuted() bool
has subscriber indicated it wants to mute this track
func (*SubscribedTrack) MediaTrack ¶ added in v0.15.0
func (t *SubscribedTrack) MediaTrack() types.MediaTrack
func (*SubscribedTrack) OnBind ¶ added in v0.15.0
func (t *SubscribedTrack) OnBind(f func())
func (*SubscribedTrack) PublisherID ¶ added in v0.15.2
func (t *SubscribedTrack) PublisherID() livekit.ParticipantID
func (*SubscribedTrack) PublisherIdentity ¶ added in v0.13.7
func (t *SubscribedTrack) PublisherIdentity() livekit.ParticipantIdentity
func (*SubscribedTrack) SetPublisherMuted ¶
func (t *SubscribedTrack) SetPublisherMuted(muted bool)
func (*SubscribedTrack) SubscriberID ¶ added in v0.15.4
func (t *SubscribedTrack) SubscriberID() livekit.ParticipantID
func (*SubscribedTrack) UpdateSubscriberSettings ¶ added in v0.9.14
func (t *SubscribedTrack) UpdateSubscriberSettings(settings *livekit.UpdateTrackSettings)
func (*SubscribedTrack) UpdateVideoLayer ¶ added in v0.15.0
func (t *SubscribedTrack) UpdateVideoLayer()
type SubscribedTrackParams ¶ added in v0.15.0
type SubscribedTrackParams struct { PublisherID livekit.ParticipantID PublisherIdentity livekit.ParticipantIdentity SubscriberID livekit.ParticipantID MediaTrack types.MediaTrack DownTrack *sfu.DownTrack AdaptiveStream bool }
type TransportParams ¶
type TransportParams struct { ParticipantID livekit.ParticipantID ParticipantIdentity livekit.ParticipantIdentity ProtocolVersion types.ProtocolVersion Target livekit.SignalTarget Config *WebRTCConfig CongestionControlConfig config.CongestionControlConfig Telemetry telemetry.TelemetryService EnabledCodecs []*livekit.Codec Logger logger.Logger SimTracks map[uint32]SimulcastTrackInfo }
type UnhandleSimulcastInterceptor ¶ added in v0.15.3
type UnhandleSimulcastInterceptor struct { interceptor.NoOp // contains filtered or unexported fields }
func (*UnhandleSimulcastInterceptor) BindRemoteStream ¶ added in v0.15.3
func (u *UnhandleSimulcastInterceptor) BindRemoteStream(info *interceptor.StreamInfo, reader interceptor.RTPReader) interceptor.RTPReader
type UnhandleSimulcastInterceptorFactory ¶ added in v0.15.3
type UnhandleSimulcastInterceptorFactory struct {
// contains filtered or unexported fields
}
func NewUnhandleSimulcastInterceptorFactory ¶ added in v0.15.3
func NewUnhandleSimulcastInterceptorFactory(opts ...UnhandleSimulcastOption) (*UnhandleSimulcastInterceptorFactory, error)
func (*UnhandleSimulcastInterceptorFactory) NewInterceptor ¶ added in v0.15.3
func (f *UnhandleSimulcastInterceptorFactory) NewInterceptor(id string) (interceptor.Interceptor, error)
type UnhandleSimulcastOption ¶ added in v0.15.3
type UnhandleSimulcastOption func(r *UnhandleSimulcastInterceptor) error
func UnhandleSimulcastTracks ¶ added in v0.15.3
func UnhandleSimulcastTracks(tracks map[uint32]SimulcastTrackInfo) UnhandleSimulcastOption
type UpTrackManager ¶ added in v0.15.3
type UpTrackManager struct {
// contains filtered or unexported fields
}
func NewUpTrackManager ¶ added in v0.15.3
func NewUpTrackManager(params UpTrackManagerParams) *UpTrackManager
func (*UpTrackManager) AddPublishedTrack ¶ added in v0.15.3
func (u *UpTrackManager) AddPublishedTrack(track types.MediaTrack)
func (*UpTrackManager) AddSubscriber ¶ added in v0.15.3
func (u *UpTrackManager) AddSubscriber(sub types.LocalParticipant, params types.AddSubscriberParams) (int, error)
AddSubscriber subscribes op to all publishedTracks
func (*UpTrackManager) Close ¶ added in v0.15.3
func (u *UpTrackManager) Close()
func (*UpTrackManager) DebugInfo ¶ added in v0.15.3
func (u *UpTrackManager) DebugInfo() map[string]interface{}
func (*UpTrackManager) GetPublishedTrack ¶ added in v0.15.3
func (u *UpTrackManager) GetPublishedTrack(trackID livekit.TrackID) types.MediaTrack
func (*UpTrackManager) GetPublishedTracks ¶ added in v0.15.3
func (u *UpTrackManager) GetPublishedTracks() []types.MediaTrack
func (*UpTrackManager) OnPublishedTrackUpdated ¶ added in v0.15.3
func (u *UpTrackManager) OnPublishedTrackUpdated(f func(track types.MediaTrack, onlyIfReady bool))
func (*UpTrackManager) OnUpTrackManagerClose ¶ added in v0.15.3
func (u *UpTrackManager) OnUpTrackManagerClose(f func())
func (*UpTrackManager) RemovePublishedTrack ¶ added in v0.15.3
func (u *UpTrackManager) RemovePublishedTrack(track types.MediaTrack)
func (*UpTrackManager) RemoveSubscriber ¶ added in v0.15.3
func (u *UpTrackManager) RemoveSubscriber(sub types.LocalParticipant, trackID livekit.TrackID, resume bool)
func (*UpTrackManager) Restart ¶ added in v0.15.7
func (u *UpTrackManager) Restart()
func (*UpTrackManager) SetPublishedTrackMuted ¶ added in v0.15.3
func (u *UpTrackManager) SetPublishedTrackMuted(trackID livekit.TrackID, muted bool) types.MediaTrack
func (*UpTrackManager) Start ¶ added in v0.15.3
func (u *UpTrackManager) Start()
func (*UpTrackManager) SubscriptionPermission ¶ added in v0.15.3
func (u *UpTrackManager) SubscriptionPermission() *livekit.SubscriptionPermission
func (*UpTrackManager) ToProto ¶ added in v0.15.3
func (u *UpTrackManager) ToProto() []*livekit.TrackInfo
func (*UpTrackManager) UpdateMediaLoss ¶ added in v0.15.3
func (*UpTrackManager) UpdateSubscribedQuality ¶ added in v0.15.3
func (u *UpTrackManager) UpdateSubscribedQuality(nodeID livekit.NodeID, trackID livekit.TrackID, maxQuality livekit.VideoQuality) error
func (*UpTrackManager) UpdateSubscriptionPermission ¶ added in v0.15.3
func (u *UpTrackManager) UpdateSubscriptionPermission( subscriptionPermission *livekit.SubscriptionPermission, resolver func(participantID livekit.ParticipantID) types.LocalParticipant, ) error
func (*UpTrackManager) UpdateVideoLayers ¶ added in v0.15.3
func (u *UpTrackManager) UpdateVideoLayers(updateVideoLayers *livekit.UpdateVideoLayers) error
type UpTrackManagerParams ¶ added in v0.15.3
type UpTrackManagerParams struct { SID livekit.ParticipantID Logger logger.Logger }
type WebRTCConfig ¶
type WebRTCConfig struct { Configuration webrtc.Configuration SettingEngine webrtc.SettingEngine Receiver ReceiverConfig BufferFactory *buffer.Factory UDPMux ice.UDPMux UDPMuxConn *net.UDPConn TCPMuxListener *net.TCPListener Publisher DirectionConfig Subscriber DirectionConfig }
func NewWebRTCConfig ¶
func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, error)
func (*WebRTCConfig) SetBufferFactory ¶ added in v0.9.11
func (c *WebRTCConfig) SetBufferFactory(factory *buffer.Factory)
type WrappedReceiver ¶
type WrappedReceiver struct { sfu.TrackReceiver // contains filtered or unexported fields }
func NewWrappedReceiver ¶
func NewWrappedReceiver(receiver sfu.TrackReceiver, trackID livekit.TrackID, streamId string) WrappedReceiver
func (WrappedReceiver) StreamID ¶
func (r WrappedReceiver) StreamID() string
func (WrappedReceiver) TrackID ¶
func (r WrappedReceiver) TrackID() livekit.TrackID
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
typesfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |