webrtc

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnswerAddr *string = nil

AnswerAddr represents the product project address that is inactive until an offer arrives from the platform side.

View Source
var Certificates tls.Certificate = tls.Certificate{}
View Source
var Config webrtc.Configuration = webrtc.Configuration{

	ICEServers: []webrtc.ICEServer{
		{
			URLs:           []string{TurnServerAddress, StunServerAddress},
			Username:       TurnAuthUserName,
			Credential:     TurnAuthCredential,
			CredentialType: webrtc.ICECredentialTypePassword,
		},
	},

	ICETransportPolicy: webrtc.ICETransportPolicyRelay,
}
View Source
var OfferAddr *string = nil

OfferAddr represents the address of the platform, that initiates webRTC with an offer.

View Source
var SendingFrequency time.Duration = 500 * time.Millisecond

SendingFrequency determines how often a message is sent via webRTC.

View Source
var StunServerAddress string = "stun:turn-server:5349?transport=udp"
View Source
var TurnAuthCredential string = "default123secret"
View Source
var TurnAuthUserName string = "defaultUser"
View Source
var TurnServerAddress string = "turns:turn-server:5349?transport=udp"

Functions

func SetupPlatformSide

func SetupPlatformSide(client *http.Client, businessLogic func() string, candiateID int)

SetupPlatformSide initializes the webrtc connection and sends the initial offer to the product project candidates identified by candidate id.

func SetupProductSide

func SetupProductSide(client *http.Client, businessLogic func() string, candiateID int)

SetupProductSide sets up the webrtc connection on the product project side Each product project will have its own candidate id that is known for the platform side for identification purposes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL