Documentation ¶
Index ¶
- Constants
- Variables
- type Call
- func (c *Call) Close()
- func (c *Call) SetMemberlistHandler(handler func(MsgMemberlistData))
- func (c *Call) SetSDPUpdateHandler(handler func(Sdp))
- func (c *Call) SetSourceUpdateHandler(handler func(MsgSourceUpdateData))
- func (c *Call) SetTerminatedHandler(handler func())
- func (c *Call) Start(ctx context.Context, sdp Sdp, displayname string) (*CallID, *Sdp, error)
- func (c *Call) Terminate(ctx context.Context) error
- func (c *Call) TurnOffVideo(ctx context.Context, off bool) error
- func (c *Call) UpdateSDP(ctx context.Context, sdp Sdp) error
- type CallID
- type CallInfo
- type CallInfoInterface
- type Dimension
- type GoSepp
- type Media
- type Member
- type MsgBase
- type MsgCallAccepted
- type MsgCallAcceptedData
- type MsgCallRejected
- type MsgCallRejectedData
- type MsgCallResume
- type MsgCallResumeData
- type MsgCallResumed
- type MsgCallResumedData
- type MsgCallStart
- type MsgCallStartData
- type MsgCallTerminate
- type MsgCallTerminateData
- type MsgCallTerminated
- type MsgCallTerminatedData
- type MsgChat
- type MsgChatData
- type MsgDesktopstreaming
- type MsgDesktopstreamingData
- type MsgInterface
- type MsgMemberlist
- type MsgMemberlistData
- type MsgMuteVideo
- type MsgMuteVideoData
- type MsgRecording
- type MsgRecordingData
- type MsgSdpUpdate
- type MsgSdpUpdateData
- type MsgSetPresenter
- type MsgSetPresenterData
- type MsgSourceUpdate
- type MsgSourceUpdateData
- type Sdp
Constants ¶
const ( MsgTypeCallStart string = "call_start" MsgTypeCallRejected string = "call_rejected" MsgTypeCallAccepted string = "call_accepted" MsgTypeSdpUpdate string = "sdp_update" MsgTypeCallTerminate string = "call_terminate" MsgTypeCallTerminated string = "call_terminated" MsgTypeCallResume string = "call_resume" MsgTypeCallResumed string = "call_resumed" MsgTypeChat string = "chat" MsgTypeSetPresenter string = "set_presenter" MsgTypeDesktopstreaming string = "desktopstreaming" MsgTypeMuteVideo string = "mute_video" MsgTypeSourceUpdate string = "source_update" MsgTypeMemberlist string = "memberlist" MsgTypeRecording string = "recording" )
Messages types
const SeppEndpoint string = "wss://sig.eyeson.com/call"
Variables ¶
var SeppMsgTypes = map[string]func() MsgInterface{ MsgTypeCallStart: func() MsgInterface { return &MsgCallStart{} }, MsgTypeCallRejected: func() MsgInterface { return &MsgCallRejected{} }, MsgTypeCallAccepted: func() MsgInterface { return &MsgCallAccepted{} }, MsgTypeSdpUpdate: func() MsgInterface { return &MsgSdpUpdate{} }, MsgTypeCallTerminate: func() MsgInterface { return &MsgCallTerminate{} }, MsgTypeCallTerminated: func() MsgInterface { return &MsgCallTerminated{} }, MsgTypeCallResume: func() MsgInterface { return &MsgCallResume{} }, MsgTypeCallResumed: func() MsgInterface { return &MsgCallResumed{} }, MsgTypeChat: func() MsgInterface { return &MsgChat{} }, MsgTypeSetPresenter: func() MsgInterface { return &MsgSetPresenter{} }, MsgTypeDesktopstreaming: func() MsgInterface { return &MsgDesktopstreaming{} }, MsgTypeMuteVideo: func() MsgInterface { return &MsgMuteVideo{} }, MsgTypeSourceUpdate: func() MsgInterface { return &MsgSourceUpdate{} }, MsgTypeMemberlist: func() MsgInterface { return &MsgMemberlist{} }, MsgTypeRecording: func() MsgInterface { return &MsgRecording{} }, }
SeppMsgTypes defines a mapping of message types and an interface function which create a messages adhering to the MsgInterface.
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call struct {
// contains filtered or unexported fields
}
Call is an abstraction of the gosepp messaging based interface.
func NewCall ¶
func NewCall(callInfo CallInfoInterface) (*Call, error)
NewCall initializes an instant of a call.
func (*Call) Close ¶
func (c *Call) Close()
Close this call. Shuts down connection to the signaling service, but does _not_ terminate the call.
func (*Call) SetMemberlistHandler ¶ added in v2.3.0
func (c *Call) SetMemberlistHandler(handler func(MsgMemberlistData))
SetMemberlistHandler set handler to be called on change of the memberlist.
func (*Call) SetSDPUpdateHandler ¶
SetSDPUpdateHandler sets the sdp-update handler which is called if the remote end is sending an updated sdp. Must be set-up before start.
func (*Call) SetSourceUpdateHandler ¶ added in v2.3.0
func (c *Call) SetSourceUpdateHandler(handler func(MsgSourceUpdateData))
SetSourceUpdateHandler set handler to be called if the podium layout changes.
func (*Call) SetTerminatedHandler ¶
func (c *Call) SetTerminatedHandler(handler func())
SetTerminatedHandler sets the termination handler which is called when the call is terminated. Must be set-up before start.
func (*Call) TurnOffVideo ¶ added in v2.3.0
TurnOffVideo mutes or unmute video
type CallInfo ¶
CallInfo is the default implementation of the CallInfoInterface.
func (*CallInfo) GetAuthToken ¶
GetAuthToken returns the jwt-auth token used as bearer authorization token.
func (*CallInfo) GetClientID ¶
GetClientID returns the clientID which is the initiator of this call.
func (*CallInfo) GetSigEndpoint ¶
GetSigEndpoint returns the sip-sepp endpoint.
type CallInfoInterface ¶
type CallInfoInterface interface { GetSigEndpoint() string GetAuthToken() string GetClientID() string GetConfID() string }
CallInfoInterface defines a configuration interface, to which the init struct of NewCall must comply.
type GoSepp ¶
type GoSepp struct {
// contains filtered or unexported fields
}
GoSepp Confserver signaling.
func NewGoSeppCustomCerts ¶
func NewGoSeppCustomCerts(baseURL string, certFile, keyFile, caFile string, insecure bool, useSystemCAPool bool, authToken string) (*GoSepp, error)
NewGoSeppCustomCerts returns a new GoSepp client using custom certs.
func (*GoSepp) ConnectStatusCh ¶
ConnectStatusCh allow to monitor the websockets connection status.
func (*GoSepp) RcvCh ¶
func (rtm *GoSepp) RcvCh() chan MsgInterface
RcvCh get the channel where message adhering to the ConfMsgInterface can be retrieved.
type MsgBase ¶
type MsgBase struct { Type string `json:"type"` MsgID string `json:"msg_id"` From string `json:"from"` To string `json:"to"` }
MsgBase base struct for all conf messages.
type MsgCallAccepted ¶
type MsgCallAccepted struct { MsgBase Data MsgCallAcceptedData `json:"data"` }
MsgCallAccepted message
type MsgCallAcceptedData ¶
MsgCallAcceptedData data
type MsgCallRejected ¶
type MsgCallRejected struct { MsgBase Data MsgCallRejectedData `json:"data"` }
MsgCallRejected message
type MsgCallRejectedData ¶
type MsgCallRejectedData struct {
RejectCode int `json:"reject_code"`
}
MsgCallRejectedData data
type MsgCallResume ¶ added in v2.1.0
type MsgCallResume struct { MsgBase Data MsgCallResumeData `json:"data"` }
MsgCallResume message
type MsgCallResumeData ¶ added in v2.1.0
MsgCallResumeData carries data for the call_resume message.
type MsgCallResumed ¶ added in v2.1.0
type MsgCallResumed struct { MsgBase Data MsgCallResumedData `json:"data"` }
MsgCallResumed message
type MsgCallResumedData ¶ added in v2.1.0
MsgCallResumedData data
type MsgCallStart ¶
type MsgCallStart struct { MsgBase Data MsgCallStartData `json:"data"` }
MsgCallStart message
type MsgCallStartData ¶
MsgCallStartData carries data of for the call_start message.
type MsgCallTerminate ¶
type MsgCallTerminate struct { MsgBase Data MsgCallTerminateData `json:"data"` }
MsgCallTerminate message
type MsgCallTerminateData ¶
MsgCallTerminateData data
type MsgCallTerminated ¶
type MsgCallTerminated struct { MsgBase Data MsgCallTerminatedData `json:"data"` }
MsgCallTerminated message
type MsgCallTerminatedData ¶
type MsgCallTerminatedData struct { CallID string `json:"call_id"` TermCode int `json:"term_code"` }
MsgCallTerminatedData data
type MsgChat ¶ added in v2.2.0
type MsgChat struct { MsgBase Data MsgChatData `json:"data"` }
type MsgChatData ¶ added in v2.2.0
type MsgDesktopstreaming ¶ added in v2.2.0
type MsgDesktopstreaming struct { MsgBase Data MsgDesktopstreamingData `json:"data"` }
type MsgDesktopstreamingData ¶ added in v2.2.0
type MsgInterface ¶
type MsgInterface interface { GetMsgID() string GetType() string GetFrom() string GetTo() string SetFrom(string) SetTo(string) }
MsgInterface define a messages which allows to get and modify the base-message. This helps to dispatch matches without having to deserialize the whole message.
type MsgMemberlist ¶ added in v2.2.0
type MsgMemberlist struct { MsgBase Data MsgMemberlistData `json:"data"` }
type MsgMemberlistData ¶ added in v2.2.0
type MsgMuteVideo ¶ added in v2.2.0
type MsgMuteVideo struct { MsgBase Data MsgMuteVideoData `json:"data"` }
type MsgMuteVideoData ¶ added in v2.2.0
type MsgRecording ¶ added in v2.2.0
type MsgRecording struct { MsgBase Data MsgRecordingData `json:"data"` }
type MsgRecordingData ¶ added in v2.2.0
type MsgSdpUpdate ¶
type MsgSdpUpdate struct { MsgBase Data MsgSdpUpdateData `json:"data"` }
MsgSdpUpdate message
type MsgSdpUpdateData ¶
MsgSdpUpdateData data
type MsgSetPresenter ¶ added in v2.2.0
type MsgSetPresenter struct { MsgBase Data MsgSetPresenterData `json:"data"` }
type MsgSetPresenterData ¶ added in v2.2.0
type MsgSourceUpdate ¶ added in v2.2.0
type MsgSourceUpdate struct { MsgBase Data MsgSourceUpdateData `json:"data"` }
type MsgSourceUpdateData ¶ added in v2.2.0
type MsgSourceUpdateData struct { CallID string `json:"call_id"` AudioSources []int `json:"asrc"` VideoSources []int `json:"vsrc"` Broadcast *bool `json:"bcast,omitempty"` Dimensions []Dimension `json:"dims"` Layout int `json:"l"` Sources []string `json:"src"` TextOverlay *bool `json:"tovl,omitempty"` PresenterSrc *int `json:"psrc,omitempty"` DesktopstreamerSrc *int `json:"dsrc,omitempty"` }