From 3c81096d70f307ead5faf150b1587a7e40dbe07f Mon Sep 17 00:00:00 2001 From: Tarrence van As Date: Fri, 13 Nov 2020 22:24:19 +0000 Subject: [PATCH] fix: propagate ice connection state change --- pkg/peer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/peer.go b/pkg/peer.go index 81ae1f3cf..9dab0f6af 100644 --- a/pkg/peer.go +++ b/pkg/peer.go @@ -123,6 +123,12 @@ func (p *Peer) Join(sid string, sdp webrtc.SessionDescription) (*webrtc.SessionD } }) + pc.OnICEConnectionStateChange(func(s webrtc.ICEConnectionState) { + if p.OnICEConnectionStateChange != nil { + p.OnICEConnectionStateChange(s) + } + }) + return &answer, nil }