Unity-Technologies / com.unity.webrtc

WebRTC package for Unity
Other
753 stars 191 forks source link

fix: Fix bug when calling GetStats method multiple times at the same time #810

Closed karasusan closed 2 years ago

karasusan commented 2 years ago

This PR fixes the issue that the coroutine which the return value of GetStats method, doesn't change the status when calling it multiple times at the same time.

Add RTCStatsCollectorCallback class which manages the native handle of the GetStats callback, and define the dictionary of RTCStatsCollectorCallback in RTCPeerConnection class.