Update go2rtc candidates processing

This commit is contained in:
Alexey Khit
2023-03-04 06:25:30 +03:00
parent d805d560b9
commit 9ab9412c95
7 changed files with 49 additions and 28 deletions
+4 -1
View File
@@ -28,7 +28,10 @@ func NewConn(pc *webrtc.PeerConnection) *Conn {
c := &Conn{pc: pc}
pc.OnICECandidate(func(candidate *webrtc.ICECandidate) {
c.Fire(candidate)
// last candidate will be empty
if candidate != nil {
c.Fire(candidate)
}
})
pc.OnDataChannel(func(channel *webrtc.DataChannel) {