Documentation ¶
Index ¶
- Constants
- func IsCandidateMDNS(candidate webrtc.ICECandidateInit) bool
- func IsICECandidateMDNS(candidate ice.Candidate) bool
- func TrafficLoadToTrafficRate(trafficLoad *TrafficLoad) (packetRateIn float64, byteRateIn float64, packetRateOut float64, ...)
- type AddSubscriberParams
- type AddTrackParams
- type ChangeNotifier
- type ICECandidateExtended
- type ICEConnectionDetails
- func (d *ICEConnectionDetails) AddLocalCandidate(c *webrtc.ICECandidate, filtered, trickle bool)
- func (d *ICEConnectionDetails) AddLocalICECandidate(c ice.Candidate, filtered, trickle bool)
- func (d *ICEConnectionDetails) AddRemoteCandidate(c webrtc.ICECandidateInit, filtered, trickle, canUpdate bool)
- func (d *ICEConnectionDetails) AddRemoteICECandidate(candidate ice.Candidate, filtered, trickle, canUpdate bool)
- func (d *ICEConnectionDetails) Clear()
- func (d *ICEConnectionDetails) GetInfo() *ICEConnectionInfo
- func (d *ICEConnectionDetails) SetSelectedPair(pair *webrtc.ICECandidatePair)
- type ICEConnectionInfo
- type ICEConnectionType
- type LocalMediaTrack
- type LocalParticipant
- type MediaResolverResult
- type MediaTrack
- type MediaTrackResolver
- type MigrateState
- type OperationMonitor
- type OperationMonitorData
- type OperationMonitorEvent
- type Participant
- type ParticipantCloseReason
- type ProtocolVersion
- func (v ProtocolVersion) HandlesDataPackets() bool
- func (v ProtocolVersion) SubscriberAsPrimary() bool
- func (v ProtocolVersion) SupportFastStart() bool
- func (v ProtocolVersion) SupportHandlesDisconnectedUpdate() bool
- func (v ProtocolVersion) SupportSyncStreamID() bool
- func (v ProtocolVersion) SupportsAsyncRoomID() bool
- func (v ProtocolVersion) SupportsConnectionQuality() bool
- func (v ProtocolVersion) SupportsConnectionQualityLost() bool
- func (v ProtocolVersion) SupportsICELite() bool
- func (v ProtocolVersion) SupportsIdentityBasedReconnection() bool
- func (v ProtocolVersion) SupportsNonErrorSignalResponse() bool
- func (v ProtocolVersion) SupportsPackedStreamId() bool
- func (v ProtocolVersion) SupportsProtobuf() bool
- func (v ProtocolVersion) SupportsRegionsInLeaveRequest() bool
- func (v ProtocolVersion) SupportsSessionMigrate() bool
- func (v ProtocolVersion) SupportsSpeakerChanged() bool
- func (v ProtocolVersion) SupportsTransceiverReuse() bool
- func (v ProtocolVersion) SupportsUnpublish() bool
- type Room
- type SignallingCloseReason
- type SubscribedCodecQuality
- type SubscribedTrack
- type TrafficLoad
- type TrafficStats
- type TrafficTypeStats
- type WebsocketClient
Constants ¶
const CurrentProtocol = 15
Variables ¶
This section is empty.
Functions ¶
func IsCandidateMDNS ¶
func IsCandidateMDNS(candidate webrtc.ICECandidateInit) bool
func IsICECandidateMDNS ¶
func IsICECandidateMDNS(candidate ice.Candidate) bool
func TrafficLoadToTrafficRate ¶
func TrafficLoadToTrafficRate(trafficLoad *TrafficLoad) ( packetRateIn float64, byteRateIn float64, packetRateOut float64, byteRateOut float64, )
Types ¶
type AddSubscriberParams ¶
type AddTrackParams ¶
type ChangeNotifier ¶
type ICECandidateExtended ¶
type ICEConnectionDetails ¶
type ICEConnectionDetails struct { ICEConnectionInfo // contains filtered or unexported fields }
func NewICEConnectionDetails ¶
func NewICEConnectionDetails(transport livekit.SignalTarget, l logger.Logger) *ICEConnectionDetails
func (*ICEConnectionDetails) AddLocalCandidate ¶
func (d *ICEConnectionDetails) AddLocalCandidate(c *webrtc.ICECandidate, filtered, trickle bool)
func (*ICEConnectionDetails) AddLocalICECandidate ¶
func (d *ICEConnectionDetails) AddLocalICECandidate(c ice.Candidate, filtered, trickle bool)
func (*ICEConnectionDetails) AddRemoteCandidate ¶
func (d *ICEConnectionDetails) AddRemoteCandidate(c webrtc.ICECandidateInit, filtered, trickle, canUpdate bool)
func (*ICEConnectionDetails) AddRemoteICECandidate ¶
func (d *ICEConnectionDetails) AddRemoteICECandidate(candidate ice.Candidate, filtered, trickle, canUpdate bool)
func (*ICEConnectionDetails) Clear ¶
func (d *ICEConnectionDetails) Clear()
func (*ICEConnectionDetails) GetInfo ¶
func (d *ICEConnectionDetails) GetInfo() *ICEConnectionInfo
func (*ICEConnectionDetails) SetSelectedPair ¶
func (d *ICEConnectionDetails) SetSelectedPair(pair *webrtc.ICECandidatePair)
type ICEConnectionInfo ¶
type ICEConnectionInfo struct { Local []*ICECandidateExtended Remote []*ICECandidateExtended Transport livekit.SignalTarget Type ICEConnectionType }
func (*ICEConnectionInfo) HasCandidates ¶
func (i *ICEConnectionInfo) HasCandidates() bool
type ICEConnectionType ¶
type ICEConnectionType string
const ( ICEConnectionTypeUDP ICEConnectionType = "udp" ICEConnectionTypeTCP ICEConnectionType = "tcp" ICEConnectionTypeTURN ICEConnectionType = "turn" ICEConnectionTypeUnknown ICEConnectionType = "unknown" )
type LocalMediaTrack ¶
type LocalMediaTrack interface { MediaTrack Restart() SignalCid() string HasSdpCid(cid string) bool GetConnectionScoreAndQuality() (float32, livekit.ConnectionQuality) GetTrackStats() *livekit.RTPStats SetRTT(rtt uint32) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, qualities []SubscribedCodecQuality) NotifySubscriberNodeMediaLoss(nodeID livekit.NodeID, fractionalLoss uint8) }
type LocalParticipant ¶
type LocalParticipant interface { Participant ToProtoWithVersion() (*livekit.ParticipantInfo, utils.TimedVersion) // getters GetTrailer() []byte GetLogger() logger.Logger GetAdaptiveStream() bool ProtocolVersion() ProtocolVersion SupportsSyncStreamID() bool SupportsTransceiverReuse() bool ConnectedAt() time.Time IsClosed() bool IsReady() bool IsDisconnected() bool Disconnected() <-chan struct{} IsIdle() bool SubscriberAsPrimary() bool GetClientInfo() *livekit.ClientInfo GetClientConfiguration() *livekit.ClientConfiguration GetBufferFactory() *buffer.Factory GetPlayoutDelayConfig() *livekit.PlayoutDelay GetPendingTrack(trackID livekit.TrackID) *livekit.TrackInfo GetICEConnectionInfo() []*ICEConnectionInfo HasConnected() bool GetEnabledPublishCodecs() []*livekit.Codec SetResponseSink(sink routing.MessageSink) CloseSignalConnection(reason SignallingCloseReason) UpdateLastSeenSignal() SetSignalSourceValid(valid bool) HandleSignalSourceClose() // updates CheckMetadataLimits(name string, metadata string, attributes map[string]string) error SetName(name string) SetMetadata(metadata string) SetAttributes(attributes map[string]string) UpdateAudioTrack(update *livekit.UpdateLocalAudioTrack) error UpdateVideoTrack(update *livekit.UpdateLocalVideoTrack) error // permissions ClaimGrants() *auth.ClaimGrants SetPermission(permission *livekit.ParticipantPermission) bool CanPublish() bool CanPublishSource(source livekit.TrackSource) bool CanSubscribe() bool CanPublishData() bool // PeerConnection AddICECandidate(candidate webrtc.ICECandidateInit, target livekit.SignalTarget) HandleOffer(sdp webrtc.SessionDescription) error GetAnswer() (webrtc.SessionDescription, error) AddTrack(req *livekit.AddTrackRequest) SetTrackMuted(trackID livekit.TrackID, muted bool, fromAdmin bool) *livekit.TrackInfo HandleAnswer(sdp webrtc.SessionDescription) Negotiate(force bool) ICERestart(iceConfig *livekit.ICEConfig) AddTrackLocal(trackLocal webrtc.TrackLocal, params AddTrackParams) (*webrtc.RTPSender, *webrtc.RTPTransceiver, error) AddTransceiverFromTrackLocal(trackLocal webrtc.TrackLocal, params AddTrackParams) (*webrtc.RTPSender, *webrtc.RTPTransceiver, error) RemoveTrackLocal(sender *webrtc.RTPSender) error WriteSubscriberRTCP(pkts []rtcp.Packet) error // subscriptions SubscribeToTrack(trackID livekit.TrackID) UnsubscribeFromTrack(trackID livekit.TrackID) UpdateSubscribedTrackSettings(trackID livekit.TrackID, settings *livekit.UpdateTrackSettings) GetSubscribedTracks() []SubscribedTrack IsTrackNameSubscribed(publisherIdentity livekit.ParticipantIdentity, trackName string) bool Verify() bool VerifySubscribeParticipantInfo(pID livekit.ParticipantID, version uint32) // WaitUntilSubscribed waits until all subscriptions have been settled, or if the timeout // has been reached. If the timeout expires, it will return an error. WaitUntilSubscribed(timeout time.Duration) error StopAndGetSubscribedTracksForwarderState() map[livekit.TrackID]*livekit.RTPForwarderState // returns list of participant identities that the current participant is subscribed to GetSubscribedParticipants() []livekit.ParticipantID IsSubscribedTo(sid livekit.ParticipantID) bool GetConnectionQuality() *livekit.ConnectionQualityInfo // server sent messages SendJoinResponse(joinResponse *livekit.JoinResponse) error SendParticipantUpdate(participants []*livekit.ParticipantInfo) error SendSpeakerUpdate(speakers []*livekit.SpeakerInfo, force bool) error SendDataPacket(kind livekit.DataPacket_Kind, encoded []byte) error SendRoomUpdate(room *livekit.Room) error SendConnectionQualityUpdate(update *livekit.ConnectionQualityUpdate) error SubscriptionPermissionUpdate(publisherID livekit.ParticipantID, trackID livekit.TrackID, allowed bool) SendRefreshToken(token string) error SendRequestResponse(requestResponse *livekit.RequestResponse) error HandleReconnectAndSendResponse(reconnectReason livekit.ReconnectReason, reconnectResponse *livekit.ReconnectResponse) error IssueFullReconnect(reason ParticipantCloseReason) // callbacks OnStateChange(func(p LocalParticipant, state livekit.ParticipantInfo_State)) OnMigrateStateChange(func(p LocalParticipant, migrateState MigrateState)) // OnTrackPublished - remote added a track OnTrackPublished(func(LocalParticipant, MediaTrack)) // OnTrackUpdated - one of its publishedTracks changed in status OnTrackUpdated(callback func(LocalParticipant, MediaTrack)) // OnTrackUnpublished - a track was unpublished OnTrackUnpublished(callback func(LocalParticipant, MediaTrack)) // OnParticipantUpdate - metadata or permission is updated OnParticipantUpdate(callback func(LocalParticipant)) OnDataPacket(callback func(LocalParticipant, livekit.DataPacket_Kind, *livekit.DataPacket)) OnSubscribeStatusChanged(fn func(publisherID livekit.ParticipantID, subscribed bool)) OnClose(callback func(LocalParticipant)) OnClaimsChanged(callback func(LocalParticipant)) HandleReceiverReport(dt *sfu.DownTrack, report *rtcp.ReceiverReport) // session migration MaybeStartMigration(force bool, onStart func()) bool NotifyMigration() SetMigrateState(s MigrateState) MigrateState() MigrateState SetMigrateInfo( previousOffer, previousAnswer *webrtc.SessionDescription, mediaTracks []*livekit.TrackPublishedResponse, dataChannels []*livekit.DataChannelInfo, ) IsReconnect() bool UpdateMediaRTT(rtt uint32) UpdateSignalingRTT(rtt uint32) CacheDownTrack(trackID livekit.TrackID, rtpTransceiver *webrtc.RTPTransceiver, downTrackState sfu.DownTrackState) UncacheDownTrack(rtpTransceiver *webrtc.RTPTransceiver) GetCachedDownTrack(trackID livekit.TrackID) (*webrtc.RTPTransceiver, sfu.DownTrackState) SetICEConfig(iceConfig *livekit.ICEConfig) GetICEConfig() *livekit.ICEConfig OnICEConfigChanged(callback func(participant LocalParticipant, iceConfig *livekit.ICEConfig)) UpdateSubscribedQuality(nodeID livekit.NodeID, trackID livekit.TrackID, maxQualities []SubscribedCodecQuality) error UpdateMediaLoss(nodeID livekit.NodeID, trackID livekit.TrackID, fractionalLoss uint32) error // down stream bandwidth management SetSubscriberAllowPause(allowPause bool) SetSubscriberChannelCapacity(channelCapacity int64) GetPacer() pacer.Pacer GetDisableSenderReportPassThrough() bool HandleMetrics(senderParticipantID livekit.ParticipantID, batch *livekit.MetricsBatch) error // BEGIN OPENVIDU BLOCK // reliable data packets may be lost for participants currently in transition from JOINED to ACTIVE state // these methods allow the participant to buffer these packets for later delivery just after reaching ACTIVE state StoreReliableDataPacketForLaterDelivery(dpData *livekit.DataPacket) DeliverStoredReliableDataPackets() }
type MediaResolverResult ¶
type MediaResolverResult struct { TrackChangedNotifier ChangeNotifier TrackRemovedNotifier ChangeNotifier Track MediaTrack // is permission given to the requesting participant HasPermission bool PublisherID livekit.ParticipantID PublisherIdentity livekit.ParticipantIdentity }
type MediaTrack ¶
type MediaTrack interface { ID() livekit.TrackID Kind() livekit.TrackType Name() string Source() livekit.TrackSource Stream() string UpdateTrackInfo(ti *livekit.TrackInfo) UpdateAudioTrack(update *livekit.UpdateLocalAudioTrack) UpdateVideoTrack(update *livekit.UpdateLocalVideoTrack) ToProto() *livekit.TrackInfo PublisherID() livekit.ParticipantID PublisherIdentity() livekit.ParticipantIdentity PublisherVersion() uint32 IsMuted() bool SetMuted(muted bool) IsSimulcast() bool GetAudioLevel() (level float64, active bool) Close(isExpectedToResume bool) IsOpen() bool // callbacks AddOnClose(func(isExpectedToResume bool)) // subscribers AddSubscriber(participant LocalParticipant) (SubscribedTrack, error) RemoveSubscriber(participantID livekit.ParticipantID, isExpectedToResume bool) IsSubscriber(subID livekit.ParticipantID) bool RevokeDisallowedSubscribers(allowedSubscriberIdentities []livekit.ParticipantIdentity) []livekit.ParticipantIdentity GetAllSubscribers() []livekit.ParticipantID GetNumSubscribers() int OnTrackSubscribed() // returns quality information that's appropriate for width & height GetQualityForDimension(width, height uint32) livekit.VideoQuality // returns temporal layer that's appropriate for fps GetTemporalLayerForSpatialFps(spatial int32, fps uint32, mime string) int32 Receivers() []sfu.TrackReceiver ClearAllReceivers(isExpectedToResume bool) IsEncrypted() bool }
MediaTrack represents a media track
type MediaTrackResolver ¶
type MediaTrackResolver func(livekit.ParticipantIdentity, livekit.TrackID) MediaResolverResult
MediaTrackResolver locates a specific media track for a subscriber
type MigrateState ¶
type MigrateState int32
const ( MigrateStateInit MigrateState = iota MigrateStateSync MigrateStateComplete )
func (MigrateState) String ¶
func (m MigrateState) String() string
type OperationMonitor ¶
type OperationMonitor interface { PostEvent(ome OperationMonitorEvent, omd OperationMonitorData) Check() error IsIdle() bool }
type OperationMonitorData ¶
type OperationMonitorData interface{}
type OperationMonitorEvent ¶
type OperationMonitorEvent int
Supervisor/operation monitor related definitions
const ( OperationMonitorEventPublisherPeerConnectionConnected OperationMonitorEvent = iota OperationMonitorEventAddPendingPublication OperationMonitorEventSetPublicationMute OperationMonitorEventSetPublishedTrack OperationMonitorEventClearPublishedTrack )
func (OperationMonitorEvent) String ¶
func (o OperationMonitorEvent) String() string
type Participant ¶
type Participant interface { ID() livekit.ParticipantID Identity() livekit.ParticipantIdentity State() livekit.ParticipantInfo_State CloseReason() ParticipantCloseReason Kind() livekit.ParticipantInfo_Kind IsRecorder() bool IsDependent() bool IsAgent() bool CanSkipBroadcast() bool Version() utils.TimedVersion ToProto() *livekit.ParticipantInfo IsPublisher() bool GetPublishedTrack(trackID livekit.TrackID) MediaTrack GetPublishedTracks() []MediaTrack RemovePublishedTrack(track MediaTrack, isExpectedToResume bool, shouldClose bool) GetAudioLevel() (smoothedLevel float64, active bool) // HasPermission checks permission of the subscriber by identity. Returns true if subscriber is allowed to subscribe // to the track with trackID HasPermission(trackID livekit.TrackID, subIdentity livekit.ParticipantIdentity) bool // permissions Hidden() bool Close(sendLeave bool, reason ParticipantCloseReason, isExpectedToResume bool) error SubscriptionPermission() (*livekit.SubscriptionPermission, utils.TimedVersion) // updates from remotes UpdateSubscriptionPermission( subscriptionPermission *livekit.SubscriptionPermission, timedVersion utils.TimedVersion, resolverBySid func(participantID livekit.ParticipantID) LocalParticipant, ) error DebugInfo() map[string]interface{} OnMetrics(callback func(Participant, *livekit.DataPacket)) }
type ParticipantCloseReason ¶
type ParticipantCloseReason int
const ( ParticipantCloseReasonNone ParticipantCloseReason = iota ParticipantCloseReasonClientRequestLeave ParticipantCloseReasonRoomManagerStop ParticipantCloseReasonVerifyFailed ParticipantCloseReasonJoinFailed ParticipantCloseReasonJoinTimeout ParticipantCloseReasonMessageBusFailed ParticipantCloseReasonPeerConnectionDisconnected ParticipantCloseReasonDuplicateIdentity ParticipantCloseReasonMigrationComplete ParticipantCloseReasonStale ParticipantCloseReasonServiceRequestRemoveParticipant ParticipantCloseReasonServiceRequestDeleteRoom ParticipantCloseReasonSimulateMigration ParticipantCloseReasonSimulateNodeFailure ParticipantCloseReasonSimulateServerLeave ParticipantCloseReasonSimulateLeaveRequest ParticipantCloseReasonNegotiateFailed ParticipantCloseReasonMigrationRequested ParticipantCloseReasonPublicationError ParticipantCloseReasonSubscriptionError ParticipantCloseReasonDataChannelError ParticipantCloseReasonMigrateCodecMismatch ParticipantCloseReasonSignalSourceClose ParticipantCloseReasonRoomClosed ParticipantCloseReasonUserRejected )
func (ParticipantCloseReason) String ¶
func (p ParticipantCloseReason) String() string
func (ParticipantCloseReason) ToDisconnectReason ¶
func (p ParticipantCloseReason) ToDisconnectReason() livekit.DisconnectReason
type ProtocolVersion ¶
type ProtocolVersion int
func (ProtocolVersion) HandlesDataPackets ¶
func (v ProtocolVersion) HandlesDataPackets() bool
func (ProtocolVersion) SubscriberAsPrimary ¶
func (v ProtocolVersion) SubscriberAsPrimary() bool
SubscriberAsPrimary indicates clients initiate subscriber connection as primary
func (ProtocolVersion) SupportFastStart ¶
func (v ProtocolVersion) SupportFastStart() bool
SupportFastStart - if client supports fast start, server side will send media streams in the first offer
func (ProtocolVersion) SupportHandlesDisconnectedUpdate ¶
func (v ProtocolVersion) SupportHandlesDisconnectedUpdate() bool
func (ProtocolVersion) SupportSyncStreamID ¶
func (v ProtocolVersion) SupportSyncStreamID() bool
func (ProtocolVersion) SupportsAsyncRoomID ¶
func (v ProtocolVersion) SupportsAsyncRoomID() bool
func (ProtocolVersion) SupportsConnectionQuality ¶
func (v ProtocolVersion) SupportsConnectionQuality() bool
SupportsConnectionQuality - avoid sending frequent ConnectionQuality updates for lower protocol versions
func (ProtocolVersion) SupportsConnectionQualityLost ¶
func (v ProtocolVersion) SupportsConnectionQualityLost() bool
func (ProtocolVersion) SupportsICELite ¶
func (v ProtocolVersion) SupportsICELite() bool
func (ProtocolVersion) SupportsIdentityBasedReconnection ¶
func (v ProtocolVersion) SupportsIdentityBasedReconnection() bool
func (ProtocolVersion) SupportsNonErrorSignalResponse ¶
func (v ProtocolVersion) SupportsNonErrorSignalResponse() bool
func (ProtocolVersion) SupportsPackedStreamId ¶
func (v ProtocolVersion) SupportsPackedStreamId() bool
func (ProtocolVersion) SupportsProtobuf ¶
func (v ProtocolVersion) SupportsProtobuf() bool
func (ProtocolVersion) SupportsRegionsInLeaveRequest ¶
func (v ProtocolVersion) SupportsRegionsInLeaveRequest() bool
func (ProtocolVersion) SupportsSessionMigrate ¶
func (v ProtocolVersion) SupportsSessionMigrate() bool
func (ProtocolVersion) SupportsSpeakerChanged ¶
func (v ProtocolVersion) SupportsSpeakerChanged() bool
SupportsSpeakerChanged - if client handles speaker info deltas, instead of a comprehensive list
func (ProtocolVersion) SupportsTransceiverReuse ¶
func (v ProtocolVersion) SupportsTransceiverReuse() bool
SupportsTransceiverReuse - if transceiver reuse is supported, optimizes SDP size
func (ProtocolVersion) SupportsUnpublish ¶
func (v ProtocolVersion) SupportsUnpublish() bool
type Room ¶
type Room interface { Name() livekit.RoomName ID() livekit.RoomID RemoveParticipant(identity livekit.ParticipantIdentity, pID livekit.ParticipantID, reason ParticipantCloseReason) UpdateSubscriptions(participant LocalParticipant, trackIDs []livekit.TrackID, participantTracks []*livekit.ParticipantTracks, subscribe bool) UpdateSubscriptionPermission(participant LocalParticipant, permissions *livekit.SubscriptionPermission) error SyncState(participant LocalParticipant, state *livekit.SyncState) error SimulateScenario(participant LocalParticipant, scenario *livekit.SimulateScenario) error ResolveMediaTrackForSubscriber(subIdentity livekit.ParticipantIdentity, trackID livekit.TrackID) MediaResolverResult GetLocalParticipants() []LocalParticipant }
Room is a container of participants, and can provide room-level actions
type SignallingCloseReason ¶
type SignallingCloseReason int
const ( SignallingCloseReasonUnknown SignallingCloseReason = iota SignallingCloseReasonMigration SignallingCloseReasonResume SignallingCloseReasonTransportFailure SignallingCloseReasonFullReconnectPublicationError SignallingCloseReasonFullReconnectSubscriptionError SignallingCloseReasonFullReconnectDataChannelError SignallingCloseReasonFullReconnectNegotiateFailed SignallingCloseReasonParticipantClose SignallingCloseReasonDisconnectOnResume SignallingCloseReasonDisconnectOnResumeNoMessages )
func (SignallingCloseReason) String ¶
func (s SignallingCloseReason) String() string
type SubscribedCodecQuality ¶
type SubscribedCodecQuality struct { CodecMime string Quality livekit.VideoQuality }
type SubscribedTrack ¶
type SubscribedTrack interface { AddOnBind(f func(error)) IsBound() bool Close(isExpectedToResume bool) OnClose(f func(isExpectedToResume bool)) ID() livekit.TrackID PublisherID() livekit.ParticipantID PublisherIdentity() livekit.ParticipantIdentity PublisherVersion() uint32 SubscriberID() livekit.ParticipantID SubscriberIdentity() livekit.ParticipantIdentity Subscriber() LocalParticipant DownTrack() *sfu.DownTrack MediaTrack() MediaTrack RTPSender() *webrtc.RTPSender IsMuted() bool SetPublisherMuted(muted bool) UpdateSubscriberSettings(settings *livekit.UpdateTrackSettings, isImmediate bool) // selects appropriate video layer according to subscriber preferences UpdateVideoLayer() NeedsNegotiation() bool }
type TrafficLoad ¶
type TrafficLoad struct {
TrafficTypeStats []*TrafficTypeStats
}
type TrafficStats ¶
type TrafficStats struct { StartTime time.Time EndTime time.Time Packets uint32 PacketsLost uint32 PacketsPadding uint32 PacketsOutOfOrder uint32 Bytes uint64 }
func AggregateTrafficStats ¶
func AggregateTrafficStats(statsList ...*TrafficStats) *TrafficStats
func RTPStatsDiffToTrafficStats ¶
func RTPStatsDiffToTrafficStats(before, after *livekit.RTPStats) *TrafficStats
type TrafficTypeStats ¶
type TrafficTypeStats struct { TrackType livekit.TrackType StreamType livekit.StreamType TrafficStats *TrafficStats }