Skip to content

Commit

Permalink
Merge pull request #84 from tada-team/ice-servers
Browse files Browse the repository at this point in the history
feat: add settings for TURN servers
  • Loading branch information
WCStudio2017 authored Apr 10, 2022
2 parents eb816ce + 5e2c3ee commit ad25c84
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion features.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ type Features struct {
// ICE servers for WebRTC
ICEServers []ICEServer `json:"ice_servers"`

// IceTransportPolicy a ice transport policy
IceTransportPolicy ICETransportPolicy `json:"ice_transport_policy,omitempty"`

// True for premise installation
CustomServer bool `json:"custom_server"`

Expand Down Expand Up @@ -305,10 +308,29 @@ type Features struct {

// Interactive Connectivity Establishment Server for WEB Rtc connection. Readonly.
type ICEServer struct {
// URls
// Urls - STUN or TURN addresses
Urls string `json:"urls"`

// UserName - username for TURN server
UserName string `json:"username,omitempty"`

// Credential - credential for TURN server
Credential string `json:"credential,omitempty"`
}

// ICETransportPolicy is a string indicating the transport selection policy
// the ICE agent should use during negotiation of connections.
// Available values: 'all', 'relay'
type ICETransportPolicy string

const (
// ICETransportPolicyRelay for get only TURN candidate pairs
ICETransportPolicyRelay ICETransportPolicy = "relay"

// ICETransportPolicyAll for get both STUN and TURN candidate pairs
ICETransportPolicyAll ICETransportPolicy = "all"
)

// Experimental translation fields for "team" entity renaming. Readonly.
type Terms struct {
// "in team"
Expand Down

0 comments on commit ad25c84

Please sign in to comment.