Versions in this module Expand all Collapse all v0 v0.2.0 Jul 6, 2026 v0.1.0 Jul 6, 2026 Changes in this version + type Agent struct + func New(opts Options) (*Agent, error) + func (a *Agent) Events() <-chan event.Event + func (a *Agent) GetParticipant(identity string) *participant.Participant + func (a *Agent) Join(ctx context.Context, roomName string) error + func (a *Agent) Leave(ctx context.Context) error + func (a *Agent) LocalParticipant() *participant.Participant + func (a *Agent) Meeting() *meeting.Meeting + func (a *Agent) OnActiveSpeakerChanged(handler func([]participant.Participant)) + func (a *Agent) OnAudioFrame(handler func(AudioFrame)) + func (a *Agent) OnDataMessage(handler func(DataMessage)) + func (a *Agent) OnParticipantJoined(handler func(participant.Participant)) + func (a *Agent) OnParticipantLeft(handler func(participant.Participant)) + func (a *Agent) OnTrackPublished(handler func(participant.Participant, track.Track)) + func (a *Agent) OnTrackUnpublished(handler func(participant.Participant, track.Track)) + func (a *Agent) RemoteParticipants() []participant.Participant + func (a *Agent) SendData(ctx context.Context, msg DataMessage) error + func (a *Agent) StartAudio(ctx context.Context) (AudioWriter, error) + func (a *Agent) StartVideo(ctx context.Context) (VideoWriter, error) + func (a *Agent) State() ConnectionState + func (a *Agent) StopAudio(ctx context.Context) error + func (a *Agent) StopVideo(ctx context.Context) error + func (a *Agent) SubscribeToAllAudio(ctx context.Context) (<-chan AudioFrame, error) + func (a *Agent) SubscribeToAudio(ctx context.Context, participantID string) (<-chan AudioFrame, error) + func (a *Agent) UpdateImage(ctx context.Context, imageData []byte) error + func (a *Agent) WriteOpusDirect(data []byte, duration time.Duration) error + type AudioConfig struct + Channels int + FrameDuration time.Duration + SampleRate int + TrackName string + type AudioFrame struct + Channels int + Data []byte + ParticipantID string + ParticipantName string + SampleRate int + SequenceNumber uint64 + Timestamp time.Time + type AudioWriter interface + Close func() error + Write func(data []byte) (int, error) + type ConnectionState string + const StateConnected + const StateConnecting + const StateDisconnected + const StateFailed + const StateReconnecting + type DataMessage struct + DestinationIDs []string + From *participant.Participant + Payload []byte + Reliable bool + Timestamp time.Time + Topic string + type ImageConfig struct + Data []byte + FrameRate int + H264Data []byte + H264Path string + Height int + Path string + TrackName string + Width int + type ImageWriter interface + Close func() error + UpdateImage func(data []byte) error + type MediaMode string + const AudioOnly + const AudioWithImage + const AudioWithVideo + type Options struct + APIKey string + APISecret string + Audio AudioConfig + AutoSubscribe bool + Identity string + Image ImageConfig + MediaMode MediaMode + Metadata map[string]string + Name string + ServerURL string + Video VideoConfig + type VideoConfig struct + Bitrate int + Codec string + FrameRate int + Height int + TrackName string + Width int + type VideoFrame struct + Data []byte + Height int + Keyframe bool + Timestamp time.Time + Width int + type VideoWriter interface + Close func() error + WriteFrame func(frame VideoFrame) error