-
Notifications
You must be signed in to change notification settings - Fork 160
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
Improve how active calls work #3029
Conversation
- Sending the `m.call.notify` event is now done in `CallScreenPresenter` once we know the sync is running. - You can mark a call of both external url or room type as joined. - Hanging up checks the current active call type and will only remove it if it matches.
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
f62fced
to
e18c8d0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3029 +/- ##
===========================================
- Coverage 75.80% 75.80% -0.01%
===========================================
Files 1623 1623
Lines 38230 38237 +7
Branches 7369 7372 +3
===========================================
+ Hits 28982 28987 +5
- Misses 5395 5397 +2
Partials 3853 3853 ☔ View full report in Codecov by Sentry. |
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.
The changes make sense, and my tests went well, thanks!
…ow-active-calls-work
* Hangs up the active call and removes any associated UI. | ||
* @param callType The type of call that the user hung up, either an external url one or a room one. | ||
*/ | ||
fun hungUpCall() | ||
fun hungUpCall(callType: CallType) |
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.
there seems to be a conflict between the docstring and the method name.
hangUpCall
or
* Called when the active call has been hung up and all associated UI was removed.
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.
*/ | ||
fun hungUpCall() | ||
fun hungUpCall(callType: CallType) | ||
|
||
/** | ||
* Called when the user joins a call. It will remove any existing UI and set the call state as [CallState.InCall]. |
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.
* Called when the user joins a call. It will remove any existing UI and set the call state as [CallState.InCall]. | |
* Called after the user joined a call. It will remove any existing UI and set the call state as [CallState.InCall]. |
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.
6538113
to
2ff3ee9
Compare
Quality Gate passedIssues Measures |
@toger5 let me know if any other changes are needed. |
@bmarty the rest made sense from just skimming over it. Is this related: element-hq/element-call#2421 |
I don't think so. We don't really have some event we receive as a push that says 'this user hung up, the call is now over' we can use to cancel the ringing, right? |
Maybe we could try using the room info and observe the call status from there as long as we have an active call now that I think about it. But I'd add that on a separate PR. |
@jmartinesp yea that is how its intended to be done. When the ring starts, we want to run the sync loop and once we receive an empty call member event (room info updates to call has stopped) we update the state again. Initially it was planned to do all this in the rust sdk directly but the app team decided this is quicker on the platform side. |
Ok, then I'll merge this as is and then continue the work on another PR once I'm free from my current tasks. |
This sounds really good. Can you evaluate with @stefanceriu if there is a chance to move some of that logic into the rust sdk? Maybe its also worth to confirm with the MSC: https://github.com/matrix-org/matrix-spec-proposals/blob/toger5/matrixrtc-call-ringing/proposals/4075-call-notify-event.md |
PoC of a platform implementation for this: #3047 |
Type of change
Content
m.call.notify
event is now done inCallScreenPresenter
once we know the sync is running.Motivation and context
@toger5 mentioned some ways in which the EXA implementation of ringing calls could be improved.
Tests
Tested devices
Checklist