Fix unneeded messages when sending initial state#16420
Draft
Fix unneeded messages when sending initial state#16420
Conversation
Member
danxuliu
commented
Nov 27, 2025
This will make possible to explicitly call it from other objects rather than having to emitting events in the WebRTC object. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This will make possible to decouple the messages sent for the initial media state from the messages sent when the media state changes during the call. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
fancycode
reviewed
Nov 27, 2025
| * restarted with each new participant that joins. | ||
| * | ||
| * Similarly, in the case of signaling messages it is not possible either to | ||
| * know when the remote participants have "seen" the local participant and thus |
Member
There was a problem hiding this comment.
Can't you just listen on the join event and when a new session joins, send it the data? With that you should not need to sent it multiple times. If you received the join event for a session, it is connected and in the room (and will be able to receive events).
Currently only changes in the audio, speaking and video state are notified, although in the future it should also notify about the nick, the raised hand or any other state. Similarly, although right now it only notifies of changes in the state it will also take care of notifying other participants about the current state when they join the call (or the local participant joins). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This will make possible to use module augmentation to provide a TypeScript definition of the class that includes the methods added by the EmitterMixin. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This will make possible to explicitly call them from other objects rather than having to emitting events in the WebRTC object. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Besides changing where they are sent in the code the new code also reduces the number of signaling messages, as now it sends it directly to each participant that joins rather than to every participant that was in the call when a participant established a connection (or joined, if that participant was not a publisher). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
fec164d to
018e796
Compare
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.