Commit Graph

60 Commits

Author SHA1 Message Date
Robin
37506cc4c1 Delegate the sending of call notifications to Element Call (#4370)
* Stop sending call notifications manually

The Element Call widget can now assume responsibility for sending them when you start a call.

* Bump Element Call embedded package to v0.14.0

* Delegate the sending of call notifications to Element Call

* Update the SDK.

* Use 'is' prefix for boolean

---------

Co-authored-by: Doug <douglase@element.io>
2025-08-01 18:47:48 +02:00
Mauro Romito
f8d1ca54dd EC: handle back navigation from the webview
EC: remove native header

updated element call to 0.13.0-rc1
2025-06-26 16:05:26 +02:00
Stefan Ceriu
009da42b08 Bump the SDK to v25.06.25-2 which enables (re)storing the sliding sync position in between app runs. 2025-06-25 17:23:22 +03:00
Mauro
1061ebe27c EC Timeout if it doesn't respond after 30 seconds (#4237)
* basic implementation

* using a decodable struct to interpret the widget message

* small code refactor/improvement
2025-06-20 18:21:31 +02:00
Mauro
220593ae77 EC: Native switch for audio outputs/inputs and earpiece (#4136)
* EC: native switch for audio outputs/inputs and earpiece

also includes proximity sensor enabling when the earpiece is used.

* test disabling and re-enabling audio on audio change

* Revert "test disabling and re-enabling audio on audio change"

This reverts commit 907c791b8df7009214f5c164ecf8fe7d90a8addc.

* pr suggestions

* pr suggestion and small refactor of the widgetAction handler
2025-06-05 12:07:41 +00:00
Mauro Romito
e71d21cc8c updated ec and sentry 2025-05-28 17:08:23 +02:00
Mauro Romito
0400072382 updated the SDK to 25.05.19 2025-05-19 16:34:37 +02:00
Stefan Ceriu
1f974c5143 Increase the duration after which a call notification is considered outdated. 2025-04-29 19:45:55 +03:00
Mauro Romito
4c09dde58d EC update and improvements
Use .startCall intent, and always pass rageshakeURL to the widget

Updated EC to 0.9.0-rc.4

rageshakeURL is now a parameter
2025-03-26 13:13:28 +01:00
Mauro Romito
0ee2199645 updated the SDK to 25.03.24 2025-03-25 12:17:11 +01:00
Doug
0badcd1303 Add developer options for Rust's Trace Log Packs. (#3929)
* Add support for configuring log packs.

* Update call widget parameters.

* Update the SDK.
2025-03-21 19:00:13 +00:00
Stefan Ceriu
1ae6fc67c4 SDK update (#3891)
* Bump the RustSDK to v25.03.11

* Replace oidc login prompt with nil following the changes from https://github.com/matrix-org/matrix-rust-sdk/pull/4761

```
/// * `prompt` - The desired user experience in the web UI. No value means
///   that the user wishes to login into an existing account, and a value of
///   `Create` means that the user wishes to register a new account.
```

* Fix trailing closure warnings

* Update the client proxy after making `getNotificationSettings()` and  `cachedAvatarUrl()` async (they used to be blocking on the rust side).

* Move `Room.isEncrypted` to the info publisher and manually update the encryption state when creating the room.

* Bump the SDK again to v25.03.12 - This introduces a new way to configure the tokio runtime that we can use to have extensions use less memory
- introduce a new Target struct that takes care of setting up rust services (tracing and tokio) for our various targets
- cleanup MXLog and friends

* Address PR comments

* Bump the SDK again, switch back to using `.consent` as the OIDC login prompt (which was reintroduced in matrix-org/matrix-rust-sdk/pull/4791)
2025-03-13 11:17:37 +02:00
Hugh Nimmo-Smith
1677c20d31 Re-enable error screens in group calls (#3856)
This reverts commit 99141735c8.
2025-03-06 10:40:06 +00:00
Hugh Nimmo-Smith
99141735c8 Revert "Show error screens in group calls (#3813)" (#3819)
This reverts commit e9fa0ce5f2.
2025-02-24 18:03:16 +00:00
Robin
e9fa0ce5f2 Show error screens in group calls (#3813)
Element Call now sends a 'close' widget action when the widget is ready to close. Usually this will be sent immediately after the 'hangup' action, but it could be sent later if the widget wants to present an error screen before closing. So by listening to the 'close' action rather than the 'hangup' action, we get to see these error screens.
2025-02-24 10:09:30 +00:00
manuroe
c29f4cc9b4 Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Stefan Ceriu
e75c930d8f Media gallery - part 1(#3588)
* Introduce a `MediaEventsTimelineFlowCoordinator`
* Update SDK API and architecture
* Add a feature flag, add translations
* Move the media events timeline presentation under the room flow coordinator state machine
* Rename `TimelineViewState.timelineViewState` of type `TimelineState` to `timelineState`
* Enabled SwiftLint's `trailing_closure` rule and fix the warnings.
2024-12-06 16:58:14 +02:00
fkwp
de1abd5bce increase ringing timeout from 15 seconds to 90 seconds 2024-12-04 10:40:11 +02:00
Stefan Ceriu
59ede9e31b Stop delaying ElementCall until the next sync loop and only notify other participants when presumed to already be up to date. (#3559) 2024-11-27 09:57:18 +02:00
Stefan Ceriu
98fb6e4fd9 #3372 - Stop setting up CallKit sessions when joining calls
- comes following the discussions on https://developer.apple.com/forums//thread/767949?answerId=812951022#812951022
- this removes the lock screen controls entirely and lets the rest of the app behave normally
2024-11-08 10:37:05 +02:00
Stefan Ceriu
9b54ed81b5 Begin a background task when receiving a call in order to get state updates for longer. 2024-11-06 13:40:58 +02:00
Doug
0da8e7af58 Fix a couple of race conditions when observing room info updates for calls. (#3487)
* Fix a race condition observing room info updates for calls.

* Fix a bug where call observation wasn't set up if the call comes when the app has been killed.
2024-11-05 17:48:07 +00:00
Stefan Ceriu
2881d77bbc Incoming session verification support (#3428)
* Fixes #1227 - Add support for receiving and interacting with incoming session verification requests.
* Fix a couple of random small warnings
* Move static view config to the view state
* Update snapshots
2024-10-29 15:21:17 +02:00
Doug
94daf13135 Replace individual RoomProxy properties with a stored RoomInfo. (#3445)
* Store RoomInfo updates in JoinedRoomProxy and read from them directly.

* Remove all RoomProxy properties that were reading from the RoomInfo.
2024-10-28 12:29:31 +00:00
Doug
4cc186be0c Fix some warnings. (#3416) 2024-10-16 08:54:34 +01:00
Stefan Ceriu
7655b33f5d Fixes element-hq/element-meta/issues/2525 - Display a warning when a user's pinned identity changes 2024-10-07 20:47:31 +03:00
Doug
ec9f6e21a8 Log any failures when creating a call widget. (#3339) 2024-09-27 11:40:43 +01:00
Stefan Ceriu
69ce39bbc3 Have ElementCall always default to the speaker; prevent the lock button from ending the call
- previously handled in 81d669e5ce
- seems the default behavior changed and we now need to manually configure the AudioSession
2024-09-27 13:38:08 +03:00
Stefan Ceriu
22bb305e79 Fixes #3197 - Allow voice message playback in the background
- inform other audio sessions on deactivation
- let CallKit handle the audioSession for ElementCall
2024-09-09 14:42:32 +03:00
Stefan Ceriu
89eae00479 Switch license to AGPL (#3237)
* Switch license file to AGPL

* Update file copyright headers

* Update the default project file header
2024-09-06 16:34:30 +03:00
Doug
6a44d79b6e Use native video call picture in picture! (#3190)
* Use native video call picture in picture!

* Handle isSupported, isPossible and web view errors.

* Use new canEnterPip method.

* Hide a room's Call button when already joined to the call.

* Tweak feature flag description.

* PR comments.
2024-08-21 17:48:57 +01:00
Stefan Ceriu
34eb596c1a Introduce a new RoomProxyType and treat rooms differently based on their membership state 2024-08-21 12:24:20 +03:00
Doug
1d29d4de8a Remove GenericCallLinkCoordinator, merging it into CallScreen. (#3181)
* Remove incorrect message send call and fix typo.

* Add overlay coordinator presentation to the NavigationRootCoordinator.

* Remove GenericCallLinkCoordinator, merging it into CallScreen.

This will allow for picture in picture on call links when available.
2024-08-19 17:21:25 +01:00
Doug
bcf417cabd Navigation support for upcoming Element Call Picture in Picture mode. (#3174) 2024-08-16 11:25:36 +01:00
Stefan Ceriu
33b78e1b11 Fix #3133 - Cancel ElementCall rining once answered elsewhere
- expose `activeRoomCallParticipants` and use them to detect if the user has joined the call from a different device
2024-08-08 16:04:47 +03:00
Stefan Ceriu
e5b4287940 Fixes #3134 - Fix answering call not opening app
- we're currently working around the widget not properly aquiring media streams by manually terminating a call before starting the web view
- it seems that there's a race condition between that and the system opening the app
- as such we need to delay terminating the call until the system gets a chance to handle the redirect
2024-08-08 16:04:47 +03:00
Stefan Ceriu
278e0a23dd Fixes #3135 - Ignore multiple call notify pushes for the same room 2024-08-08 16:04:47 +03:00
Stefan Ceriu
81d669e5ce Fixes #3136 - Stop manually configuring ElementCall's AudioSession
- CallKit decides what action to to take when pressing the hardware lock button based on where the audio is routed to. Using the speaker will make it lock the phone while using the headset will make it end the call.
- Before the introduction of CallKit we had to manually setup the AudioSession to keep the audio live in the background. This is now clashing with CallKit making it bevelie the audio is not routed to the speaker and causing the call be terminated when pressing the lock button.
2024-08-08 16:04:47 +03:00
Stefan Ceriu
11285f3a55 Fixes #3050 - Sync mute state between ElementCall and CallKit 2024-08-06 14:31:27 +03:00
Stefan Ceriu
40667f79c0 Fixes #3041 - ElementCall unable to access media on ongoing CallKit session. 2024-07-22 17:39:22 +03:00
Doug
af32b84826 Update the SDK fixing a few room list bugs. (#3054)
* Update the SDK.

* Handle API break for editing timeline items.

* Handle API break for Element Call
2024-07-17 15:48:32 +01:00
Stefan Ceriu
7e14540287 Fixes #3042 - Cancel ElementCall ringing as soon as the call ends 2024-07-17 10:24:30 +03:00
Stefan Ceriu
94b8b150ab Hook up CallKit lock screen muting controls to the ElementCall widget 2024-07-17 10:24:30 +03:00
Stefan Ceriu
d8321fdc40 Fixes #3041 - Video not rendering after starting or joinng a call
- not completely sure why this happens but `reportOutgoingCall` interferes with how the WebView gets access to video streams
- the call itself isn't really necessary so removing it is the simplest way forward
2024-07-17 10:24:30 +03:00
Doug
01e3010b49 Make sure Element Call uses the correct theme and language. (#3017) 2024-07-09 12:07:13 +01:00
Stefan Ceriu
90a22ce5c9 Cleanup how we setup the CallKit provider and have it be used for outgoing calls as well (#2967)
- tear down ElementCall screens when ending the call from the CXCallController
- make the call UI available in the task manager and lock screen
- Fix broken hang up widget message format
2024-06-27 14:07:44 +03:00
Mauro
4ffdfcf1ce Improve UX when answering EL-Call through the notification (#2965) 2024-06-24 16:51:43 +00:00
Stefan Ceriu
9c15d52a3b Fixes #1997 - Be more specific with the widget permissions 2024-05-29 14:01:35 +03:00
Stefan Ceriu
b4c0048ba7 Delay seting up a "new" call session until after accepting the incoming call. 2024-05-27 17:04:48 +03:00
Stefan Ceriu
1b496f0390 Automatically silence ringing calls after 15 seconds of inactivity 2024-05-27 17:04:48 +03:00