The javascript implementations of the WebRTC APIs in most browser emit a signalingstatechange event to an RTCPeerConnection to notify it that its signaling state, as indicated by the signalingState property, has changed (see here).
However RTCPeerConection in Unity's WebRTC implementation does not emit such an event. Therefore you must keep checking if the value of the SignalingState property changes in a Coroutine / Task / etc. This produces unnecessary overhead.
Describe the solution you'd like
Add a OnSignalingStateChange property to the RTCPeerConnection class of type DelegateOnSignalingStateChange. The DelegateOnSignalingStateChange delegate type should accept a variable of type RTCSignalingState. Any event handlers registered to the OnSignalingStateChange property should be called whenever the value of the SignalingState property of the RTCPeerConnection instance changes.
Is your feature request related to a problem?
The javascript implementations of the WebRTC APIs in most browser emit a
signalingstatechange
event to anRTCPeerConnection
to notify it that its signaling state, as indicated by thesignalingState
property, has changed (see here). HoweverRTCPeerConection
in Unity's WebRTC implementation does not emit such an event. Therefore you must keep checking if the value of theSignalingState
property changes in aCoroutine
/Task
/ etc. This produces unnecessary overhead.Describe the solution you'd like
Add a
OnSignalingStateChange
property to theRTCPeerConnection
class of typeDelegateOnSignalingStateChange
. TheDelegateOnSignalingStateChange
delegate type should accept a variable of typeRTCSignalingState
. Any event handlers registered to theOnSignalingStateChange
property should be called whenever the value of theSignalingState
property of theRTCPeerConnection
instance changes.Describe alternatives you've considered
No response
Additional context
No response