iceservers with auth.

This commit is contained in:
Miroslav Šedivý
2021-03-17 15:47:49 +01:00
parent 4abe0a5dba
commit 552223d031
6 changed files with 82 additions and 34 deletions

View File

@ -40,12 +40,11 @@ type SystemDisconnect struct {
/////////////////////////////
type SignalProvide struct {
Event string `json:"event,omitempty"`
SDP string `json:"sdp"`
Lite bool `json:"lite"`
ICE []string `json:"ice"`
Videos []string `json:"videos"`
Video string `json:"video"`
Event string `json:"event,omitempty"`
SDP string `json:"sdp"`
ICEServers []types.ICEServer `json:"iceservers"`
Videos []string `json:"videos"`
Video string `json:"video"`
}
type SignalCandidate struct {

View File

@ -2,6 +2,12 @@ package types
import "github.com/pion/webrtc/v3"
type ICEServer struct {
URLs []string `mapstructure:"urls" json:"urls"`
Username string `mapstructure:"username" json:"username"`
Credential string `mapstructure:"credential" json:"credential"`
}
type WebRTCPeer interface {
SignalAnswer(sdp string) error
SignalCandidate(candidate webrtc.ICECandidateInit) error
@ -17,8 +23,7 @@ type WebRTCManager interface {
Start()
Shutdown() error
ICELite() bool
ICEServers() []string
ICEServers() []ICEServer
CreatePeer(session Session, videoID string) (*webrtc.SessionDescription, error)
}