Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST]: Add OnSignalingStateChange property to RTCPeerConnection class #1036

Open
vsx-sieber opened this issue May 24, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@vsx-sieber
Copy link

vsx-sieber commented May 24, 2024

Is your feature request related to a problem?

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.

Describe alternatives you've considered

No response

Additional context

No response

@vsx-sieber vsx-sieber added the enhancement New feature or request label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants