add Trickle ICE support.

This commit is contained in:
Miroslav Šedivý 2021-02-02 20:43:33 +01:00
parent dd4c67a6c4
commit cae8201908
9 changed files with 68 additions and 17 deletions

View file

@ -17,6 +17,10 @@ func (webrtc_peer *WebRTCPeerCtx) SignalAnswer(sdp string) error {
})
}
func (webrtc_peer *WebRTCPeerCtx) SignalCandidate(candidate webrtc.ICECandidateInit) error {
return webrtc_peer.connection.AddICECandidate(candidate)
}
func (webrtc_peer *WebRTCPeerCtx) Destroy() error {
if webrtc_peer.connection == nil || webrtc_peer.connection.ConnectionState() != webrtc.PeerConnectionStateConnected {
return nil