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

Refactor GroupCall participant management #2902

Merged
merged 7 commits into from
Nov 28, 2022

Conversation

robintown
Copy link
Member

@robintown robintown commented Nov 21, 2022

This refactoring brings a number of improvements to GroupCall, which I've unfortunately had to combine into a single commit due to coupling:

  • Moves the expiration timestamp field on call membership state to be per-device
  • Makes the participants of a group call visible without having to enter the call yourself
  • Enables users to join group calls from multiple devices
  • Identifies active speakers by their call feed, rather than just their user ID
  • Plays nicely with clients that can be in multiple calls in a room at once
  • Fixes a memory leak caused by the call retry loop never stopping
  • Changes GroupCall to update its state synchronously, and write back to room state asynchronously
    • This was already sort of halfway being done, but now we'd be committing to it
    • Generally improves the robustness of the state machine
    • It means that group call joins will appear instant, in a sense

For many reasons, this is a breaking change.

Notes: Enable users to join group calls from multiple devices


Here's what your changelog entry will look like:

🚨 BREAKING CHANGES

  • Enable users to join group calls from multiple devices (#2902).

This refactoring brings a number of improvements to GroupCall, which I've unfortunately had to combine into a single commit due to coupling:

- Moves the expiration timestamp field on call membership state to be per-device
- Makes the participants of a group call visible without having to enter the call yourself
- Enables users to join group calls from multiple devices
- Identifies active speakers by their call feed, rather than just their user ID
- Plays nicely with clients that can be in multiple calls in a room at once
- Fixes a memory leak caused by the call retry loop never stopping
- Changes GroupCall to update its state synchronously, and write back to room state asynchronously
  - This was already sort of halfway being done, but now we'd be committing to it
  - Generally improves the robustness of the state machine
  - It means that group call joins will appear instant, in a sense

For many reasons, this is a breaking change.
@robintown
Copy link
Member Author

Currently blocked on updating Element Call and matrix-react-sdk to be compatible with these changes

@robintown
Copy link
Member Author

I've removed the review request for the general element-web team, since the only change outside of src/webrtc is the addition of a small utility function

Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phew - big PR! Looks plausible I think.

su-ex added a commit to SchildiChat/matrix-js-sdk that referenced this pull request Dec 6, 2022
* Enable users to join group calls from multiple devices ([\matrix-org#2902](matrix-org#2902)).
* Deprecate a function containing a typo ([\matrix-org#2904](matrix-org#2904)).
* sliding sync: add receipts extension ([\matrix-org#2912](matrix-org#2912)).
* Define a spec support policy for the js-sdk ([\matrix-org#2882](matrix-org#2882)).
* Further improvements to e2ee logging ([\matrix-org#2900](matrix-org#2900)).
* sliding sync: add support for typing extension ([\matrix-org#2893](matrix-org#2893)).
* Improve logging on Olm session errors ([\matrix-org#2885](matrix-org#2885)).
* Improve logging of e2ee messages ([\matrix-org#2884](matrix-org#2884)).
* Fix 3pid invite acceptance not working due to mxid being sent in body ([\matrix-org#2907](matrix-org#2907)). Fixes element-hq/element-web#23823.
* Don't hang up calls that haven't started yet ([\matrix-org#2898](matrix-org#2898)).
* Read receipt accumulation for threads ([\matrix-org#2881](matrix-org#2881)).
* Make GroupCall work better with widgets ([\matrix-org#2935](matrix-org#2935)).
* Fix highlight notifications increasing when total notification is zero ([\matrix-org#2937](matrix-org#2937)). Fixes element-hq/element-web#23885.
* Fix synthesizeReceipt ([\matrix-org#2916](matrix-org#2916)). Fixes element-hq/element-web#23827 element-hq/element-web#23754 and element-hq/element-web#23847.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants