Documentation ¶
Index ¶
- Constants
- Variables
- func ParseTrackID(trackID string) (string, string, error)
- type CallJobState
- type CallJoinMessage
- type CallReconnectMessage
- type Client
- func (c *Client) Close() error
- func (c *Client) Connect() error
- func (c *Client) GetCallsConfig() (map[string]any, error)
- func (c *Client) LowerHand() error
- func (c *Client) Mute() error
- func (c *Client) On(eventType EventType, h EventHandler) error
- func (c *Client) RaiseHand() error
- func (c *Client) SendWS(ev string, msg any, binary bool) error
- func (c *Client) StartRecording() error
- func (c *Client) StartScreenShare(tracks []webrtc.TrackLocal) (*webrtc.RTPTransceiver, error)
- func (c *Client) StopRecording() error
- func (c *Client) StopScreenShare() error
- func (c *Client) Unmute(track webrtc.TrackLocal) error
- type Config
- type EventHandler
- type EventType
- type Option
Constants ¶
View Source
const ( TrackTypeVoice = "voice" TrackTypeScreen = "screen" )
Variables ¶
View Source
var (
ErrAlreadySubscribed = errors.New("already subscribed")
)
Functions ¶
Types ¶
type CallJobState ¶
type CallJobState struct { Type string `json:"type"` InitAt int64 `json:"init_at"` StartAt int64 `json:"start_at"` EndAt int64 `json:"end_at"` Err string `json:"err,omitempty"` }
func (*CallJobState) FromMap ¶
func (cjs *CallJobState) FromMap(m map[string]any)
type CallJoinMessage ¶
type CallReconnectMessage ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Golang implementation of a client for Mattermost Calls.
func (*Client) GetCallsConfig ¶ added in v0.15.0
TODO: return a proper Config object, ideally exposed in github.com/mattermost/mattermost-plugin-calls/server/public.
func (*Client) On ¶
func (c *Client) On(eventType EventType, h EventHandler) error
On is used to subscribe to any events fired by the client. Note: there can only be one subscriber per event type.
func (*Client) StartRecording ¶ added in v0.15.0
func (*Client) StartScreenShare ¶ added in v0.15.0
func (*Client) StopRecording ¶ added in v0.15.0
func (*Client) StopScreenShare ¶ added in v0.15.0
type Config ¶
type Config struct { // SiteURL is the URL of the Mattermost installation to connect to. SiteURL string // AuthToken is a valid user session authentication token. AuthToken string // ChannelID is the id of the channel to start or join a call in. ChannelID string // JobID is an id used to identify bot initiated sessions (e.g. // recording/transcription) JobID string // EnableAV1 controls whether the client should advertise support // for receiving the AV1 codec. EnableAV1 bool // EnableDCSignaling controls whether the client should use data channels // for signaling of media tracks. EnableDCSignaling bool // EnableRTCMonitor controls whether the RTC monitor component should be enabled. EnableRTCMonitor bool // contains filtered or unexported fields }
type EventHandler ¶
type EventType ¶
type EventType string
const ( RTCConnectEvent EventType = "RTCConnect" RTCDisconnectEvent EventType = "RTCDisconnect" RTCTrackEvent EventType = "RTCTrack" RTCSenderRTCPPacketEvent EventType = "RTCSenderRTCPPacket" CloseEvent EventType = "Close" ErrorEvent EventType = "Error" WSConnectEvent EventType = "WSConnect" WSDisconnectEvent EventType = "WSDisconnect" WSCallJoinEvent EventType = "WSCallJoin" WSCallRecordingStateEvent EventType = "WSCallRecordingState" // DEPRECATED WSCallJobStateEvent EventType = "WSCallJobState" WSJobStopEvent EventType = "WSStopJobEvent" WSCallHostChangedEvent EventType = "WSCallHostChanged" WSCallMutedEvent EventType = "WSCallMuted" WSCallUnmutedEvent EventType = "WSCallUnmuted" WSCallRaisedHandEvent EventType = "WSCallRaisedHand" WSCallLoweredHandEvent EventType = "WSCallLoweredHand" WSCallScreenOnEvent EventType = "WSCallScreenOn" WSCallScreenOffEvent EventType = "WSCallScreenOff" )
Click to show internal directories.
Click to hide internal directories.