mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-10 23:57:27 +02:00
add Trickle ICE support.
This commit is contained in:
parent
dd4c67a6c4
commit
cae8201908
9 changed files with 68 additions and 17 deletions
|
@ -7,9 +7,10 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
SIGNAL_REQUEST = "signal/request"
|
||||
SIGNAL_ANSWER = "signal/answer"
|
||||
SIGNAL_PROVIDE = "signal/provide"
|
||||
SIGNAL_REQUEST = "signal/request"
|
||||
SIGNAL_ANSWER = "signal/answer"
|
||||
SIGNAL_PROVIDE = "signal/provide"
|
||||
SIGNAL_CANDIDATE = "signal/candidate"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package message
|
||||
|
||||
import (
|
||||
"github.com/pion/webrtc/v3"
|
||||
|
||||
"demodesk/neko/internal/types"
|
||||
)
|
||||
|
||||
|
@ -45,6 +47,11 @@ type SignalProvide struct {
|
|||
ICE []string `json:"ice"`
|
||||
}
|
||||
|
||||
type SignalCandidate struct {
|
||||
Event string `json:"event,omitempty"`
|
||||
*webrtc.ICECandidateInit
|
||||
}
|
||||
|
||||
type SignalAnswer struct {
|
||||
Event string `json:"event,omitempty"`
|
||||
SDP string `json:"sdp"`
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package types
|
||||
|
||||
import "net/http"
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/pion/webrtc/v3"
|
||||
)
|
||||
|
||||
type MemberProfile struct {
|
||||
Secret string `json:"secret,omitempty"`
|
||||
|
@ -58,6 +62,7 @@ type Session interface {
|
|||
SetWebRTCPeer(webrtc_peer WebRTCPeer)
|
||||
SetWebRTCConnected(connected bool)
|
||||
SignalAnswer(sdp string) error
|
||||
SignalCandidate(candidate webrtc.ICECandidateInit) error
|
||||
}
|
||||
|
||||
type SessionManager interface {
|
||||
|
|
|
@ -4,6 +4,8 @@ import "github.com/pion/webrtc/v3"
|
|||
|
||||
type WebRTCPeer interface {
|
||||
SignalAnswer(sdp string) error
|
||||
SignalCandidate(candidate webrtc.ICECandidateInit) error
|
||||
|
||||
Destroy() error
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue