implement signal offer.

This commit is contained in:
Miroslav Šedivý
2021-11-25 00:07:17 +01:00
parent a260ce6a60
commit 44e74e3088
6 changed files with 27 additions and 4 deletions

View File

@ -10,6 +10,7 @@ const (
const (
SIGNAL_REQUEST = "signal/request"
SIGNAL_RESTART = "signal/restart"
SIGNAL_OFFER = "signal/offer"
SIGNAL_ANSWER = "signal/answer"
SIGNAL_PROVIDE = "signal/provide"
SIGNAL_CANDIDATE = "signal/candidate"

View File

@ -56,7 +56,7 @@ type SignalCandidate struct {
webrtc.ICECandidateInit
}
type SignalAnswer struct {
type SignalDescription struct {
SDP string `json:"sdp"`
}

View File

@ -19,6 +19,7 @@ type ICEServer struct {
type WebRTCPeer interface {
CreateOffer(ICERestart bool) (*webrtc.SessionDescription, error)
SignalOffer(sdp string) error
SignalAnswer(sdp string) error
SignalCandidate(candidate webrtc.ICECandidateInit) error