MixedReality-WebRTC
MixedReality-WebRTC copied to clipboard
PeerConnection state change event
Hello
I can't seem to find state change event for PeerConnection class (equivalent to RTCPeerConnection.onconnectionstatechange for javascript API). I want to detect when a PeerConnection disconnects. Am I missing something ?
Thanks
I believe you want the IceStateChanged event (note: not IceGatheringStateChanged).
If you're using the Unity library, if there's no equivalent event exposed, you'll want to access the NativePeer property to get this underlying PeerConnection object.