-
Notifications
You must be signed in to change notification settings - Fork 509
[stable24] Disconnect received videos when not needed #7247
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
Merged
Conversation
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
If the HPB is used it is enough to reconnect only with the receiver peer that needs a negotiation rather than forcing a full reconnection. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Before a negotiation needed event in a receiver Peer caused a forced reconnection, so the whole call was reset. Now only the affected Peer object is reset, so the simulcast levels previously set need to be set again on the new Peer object. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When an offer is requested to the HPB the old connection is stopped and a new one is created. If the HPB has support for updating the subscribers this is now used instead when negotiation is needed, as this prevents the existing connection (and thus the media) to be interrupted during the renegotiation. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Remote video can be blocked and allowed again by adjusting the direction of the video transceiver of RTCPeerConnections, which triggers a "negotiationneeded" event. When a negotiation is needed a new exchange of offers and answers needs to be made between the peers. Renegotiations need to be supported by both peers, so currently this is available only with the HPB, and only on versions that support the "update-sdp" feature. When the HPB is being used "negotiationneeded" event causes a new offer to be requested, which will be an update if the HPB supports it. Updates rather than new connections are needed to prevent an audio interruption while the connection changes. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
If the connection transitions to "disconnected" (or was disconnected before starting the renegotiation) the UI will wrongly show the message about reconnecting due to connection problems. I have not found an easy way to solve this, as it would require to keep track of whether a renegotiation started due to handling the "negotiationneeded" event or something else (and, in the future, once renegotiations are implemented also without HPB, it should be necessary to know too if the offer was sent by the remote peer for other reasons). Due to this, for now a slightly misleading message will be shown if the connection is updated while "disconnected". Signed-off-by: Daniel Calviño Sánchez <[email protected]>
A remote video is not needed when it was explicitly disabled by the local user (independently of whether it is enabled by the remote participant) or when it is not visible. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Now the remote videos will be blocked when not needed, that is, when explicitly disabled by the local user or when not visible. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The "talk:video:toggled" event is triggered by VideoBottomBar and only handled in CallView to enable or disable the remote video. As the handling just calls a method in the RemoteVideoBlocker this can be directly done in the VideoBottomBar instead. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
danxuliu
approved these changes
Apr 29, 2022
Member
danxuliu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature: call 📹
Voice and video calls
feature: frontend 🖌️
"Web UI" client
feature: signaling 📶
Internal and external signaling backends
feature: WebRTC 🚡
WebRTC connection between browsers and/or mobile clients
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.
backport of #6862