Start and end connections based on "inCall" flags changes #2610
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.
Until now the connections were started when a participant joined with audio and/or video (or, if there was no HPB, if the self participant had audio and/or video), and ended when a participant left the call. If a participant starts or stops publishing while being in the call, either because the user now selected a microphone or camera or because the participant was granted permissions, the participant force reconnected to the call (leave and join it again), which ensured that all other participants started or ended the connections as needed. To avoid having to force reconnect and have a smoother call experience now the clients are expected to keep track of the "inCall" flags and start and end the connections as needed with the existing session.
Note that if the client is used against an older Talk version everything would still work as before; as the other participant leaves and joins the call again with a different session when needed the call flags would not be updated for the previous session (other than to leave it), so the new code to handle the updated call flags should have no effect (and, even if it does, the connection would be established as needed against the new session once the participant joins again).
The code also takes into account the scenario when the HPB is not used, but forced reconnections may still be used without HPB for the time being. In any case, it should work as expected with or without forced reconnections.
How to test
Result with this pull request
The participant from the browser can be heard or seen from the Android app
Result without this pull request
The participant from the browser can not be heard nor seen from the Android app