Skip to content

Commit

Permalink
fix: propagate ice connection state change
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Nov 13, 2020
1 parent baddd72 commit 3c81096
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 3c81096

Please sign in to comment.