Documentation ¶
Index ¶
- Constants
- type Participant
- type ProtocolVersion
- func (v ProtocolVersion) HandlesDataPackets() bool
- func (v ProtocolVersion) SubscriberAsPrimary() bool
- func (v ProtocolVersion) SupportsPackedStreamId() bool
- func (v ProtocolVersion) SupportsProtobuf() bool
- func (v ProtocolVersion) SupportsSpeakerChanged() bool
- func (v ProtocolVersion) SupportsTransceiverReuse() bool
- type PublishedTrack
- type SubscribedTrack
- type TrackRemote
- type WebsocketClient
Constants ¶
View Source
const DefaultProtocol = 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Participant ¶
type Participant interface { ID() string Identity() string State() livekit.ParticipantInfo_State ProtocolVersion() ProtocolVersion IsReady() bool ConnectedAt() time.Time ToProto() *livekit.ParticipantInfo RTCPChan() chan []rtcp.Packet SetMetadata(metadata string) SetPermission(permission *livekit.ParticipantPermission) GetResponseSink() routing.MessageSink SetResponseSink(sink routing.MessageSink) SubscriberMediaEngine() *webrtc.MediaEngine Negotiate() ICERestart() error AddTrack(req *livekit.AddTrackRequest) GetPublishedTracks() []PublishedTrack GetSubscribedTracks() []SubscribedTrack HandleOffer(sdp webrtc.SessionDescription) (answer webrtc.SessionDescription, err error) HandleAnswer(sdp webrtc.SessionDescription) error AddICECandidate(candidate webrtc.ICECandidateInit, target livekit.SignalTarget) error AddSubscriber(op Participant) (int, error) RemoveSubscriber(peerId string) SendJoinResponse(info *livekit.Room, otherParticipants []Participant, iceServers []*livekit.ICEServer) error SendParticipantUpdate(participants []*livekit.ParticipantInfo) error SendSpeakerUpdate(speakers []*livekit.SpeakerInfo) error SendDataPacket(packet *livekit.DataPacket) error SendRoomUpdate(room *livekit.Room) error SetTrackMuted(trackId string, muted bool, fromAdmin bool) GetAudioLevel() (level uint8, active bool) CanPublish() bool CanSubscribe() bool CanPublishData() bool Hidden() bool Start() Close() error OnStateChange(func(p Participant, oldState livekit.ParticipantInfo_State)) // OnTrackPublished - remote added a remoteTrack OnTrackPublished(func(Participant, PublishedTrack)) // OnTrackUpdated - one of its publishedTracks changed in status OnTrackUpdated(callback func(Participant, PublishedTrack)) OnMetadataUpdate(callback func(Participant)) OnDataPacket(callback func(Participant, *livekit.DataPacket)) OnClose(func(Participant)) AddSubscribedTrack(participantId string, st SubscribedTrack) RemoveSubscribedTrack(participantId string, st SubscribedTrack) SubscriberPC() *webrtc.PeerConnection UpdateAfterActive() bool DebugInfo() map[string]interface{} }
type ProtocolVersion ¶
type ProtocolVersion int
func (ProtocolVersion) HandlesDataPackets ¶
func (v ProtocolVersion) HandlesDataPackets() bool
func (ProtocolVersion) SubscriberAsPrimary ¶ added in v0.13.0
func (v ProtocolVersion) SubscriberAsPrimary() bool
SubscriberAsPrimary indicates clients initiate subscriber connection as primary
func (ProtocolVersion) SupportsPackedStreamId ¶
func (v ProtocolVersion) SupportsPackedStreamId() bool
func (ProtocolVersion) SupportsProtobuf ¶ added in v0.11.0
func (v ProtocolVersion) SupportsProtobuf() bool
func (ProtocolVersion) SupportsSpeakerChanged ¶ added in v0.13.0
func (v ProtocolVersion) SupportsSpeakerChanged() bool
SupportsSpeakerChanged - if client handles speaker info deltas, instead of a comprehensive list
func (ProtocolVersion) SupportsTransceiverReuse ¶ added in v0.13.3
func (v ProtocolVersion) SupportsTransceiverReuse() bool
SupportsTransceiverReuse - if transceiver reuse is supported, optimizes SDP size
type PublishedTrack ¶
type PublishedTrack interface { Start() ID() string Kind() livekit.TrackType Name() string IsMuted() bool SetMuted(muted bool) AddSubscriber(participant Participant) error RemoveSubscriber(participantId string) IsSubscriber(subId string) bool RemoveAllSubscribers() ToProto() *livekit.TrackInfo // callbacks OnClose(func()) }
PublishedTrack is the main interface representing a track published to the room it's responsible for managing subscribers and forwarding data from the input track to all subscribers
type SubscribedTrack ¶
type TrackRemote ¶
type TrackRemote interface { SSRC() webrtc.SSRC StreamID() string Kind() webrtc.RTPCodecType Codec() webrtc.RTPCodecParameters }
interface for properties of webrtc.TrackRemote
Click to show internal directories.
Click to hide internal directories.