mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-05 12:22:52 +02:00
implement signal offer.
This commit is contained in:
parent
a260ce6a60
commit
44e74e3088
6 changed files with 27 additions and 4 deletions
|
@ -45,6 +45,13 @@ func (peer *WebRTCPeerCtx) CreateOffer(ICERestart bool) (*webrtc.SessionDescript
|
|||
return peer.connection.LocalDescription(), nil
|
||||
}
|
||||
|
||||
func (peer *WebRTCPeerCtx) SignalOffer(sdp string) error {
|
||||
return peer.connection.SetRemoteDescription(webrtc.SessionDescription{
|
||||
SDP: sdp,
|
||||
Type: webrtc.SDPTypeOffer,
|
||||
})
|
||||
}
|
||||
|
||||
func (peer *WebRTCPeerCtx) SignalAnswer(sdp string) error {
|
||||
return peer.connection.SetRemoteDescription(webrtc.SessionDescription{
|
||||
SDP: sdp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue