Repository navigation
[stable24] Disconnect received videos when not needed - #7247
Merged
Merged
Conversation
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 <danxuliu@gmail.com>
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 <danxuliu@gmail.com>
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 <danxuliu@gmail.com>
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 <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>
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 <danxuliu@gmail.com>
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 <danxuliu@gmail.com>
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 <danxuliu@gmail.com>
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 <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.
backport of #6862