MixedReality-WebRTC icon indicating copy to clipboard operation
MixedReality-WebRTC copied to clipboard

PeerConnection state change event

Open wenjunche opened this issue 4 years ago • 1 comments

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

wenjunche avatar Jul 18 '21 01:07 wenjunche

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.

spacecheeserocks avatar Jul 18 '21 07:07 spacecheeserocks