74 Commits

Author SHA1 Message Date
Doug
df1a407142 Remove support for handling SPA calls within the app. (#5515)
* Remove support for handling SPA call links.

They were a stop-gap solution whilst we were building support for embedded room calling.

* Simplify ElementCallConfiguration now that there is only 1 type of call to handle.

* Remove the unused overlayModule from NavigationRoomCoordinator.
2026-04-29 19:32:38 +01:00
Valere Fedronic
d792f6e4f9 Require video for callkit even if voice call only to workaround a bug answering calls on the lock screen (#5366) 2026-04-09 14:18:06 +00:00
Valere
2afac7857e call: Support voice only incoming call 2026-03-30 17:49:46 +02:00
Stefan Ceriu
9c256d4598 Fix call service completion handler calls. (#5026)
* Rewrite the CallService's incoming push handling to async

* Revert "Rewrite the CallService's incoming push handling to async"

* Make sure to call the completion blocks on all branches after delivering incoming pushes

Fixes `Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push` crashes
Initially tried replacing the callback based API with the async one but notifications stopped coming in. See associated PR for commits and details.
2026-02-02 17:43:03 +02:00
Stefan Ceriu
04053ae69b Update files following swiftformat upgrade 2026-01-27 12:50:57 +02:00
Doug
15720558ef Silence some warnings. (#4747) 2025-11-14 16:59:54 +00:00
Valere Fedronic
c75353a903 MSC4075 Use expirationTS to define the call ringing window (#4652)
* Listen to call decline to stop ringing when declined from other device

* MSC4075 Use expirationTS to define the call ringing window

* Implement ElementCallService tests.

* Update acknowledgements.
2025-11-12 12:59:09 +00:00
Mauro
6160c44d67 Update copyright holding and dates (#4640)
* Update copyright holding and dates

* compound IDE Macros updated

* update copyright

* update copyrights done

* update templates and README
2025-10-21 14:34:56 +02:00
Doug
9ac83d06c7 Update the SDK and Element Call. (#4522)
* Update the SDK and Element Call.

Additionally fix a bug where there was no way to navigate out of a call link after hanging up.

* Remove the temporary parameters.
2025-09-18 18:24:24 +01:00
Valere Fedronic
cb62112159 Listen to call decline to stop ringing when declined from other device (#4505)
* Listen to call decline to stop ringing when declined from other device

* use proper swift naming convention for Id/ID

* fix Force unwrapping

* fix lint

* An approach without the custom publisher.

* review: correct naming convention

* review: revert some invisible char/tab changes

* add ref to the room proxy in the closure

---------

Co-authored-by: Doug <douglase@element.io>
2025-09-18 16:11:03 +02:00
Valere Fedronic
dc1f174d40 Element Call: Send rtc.decline event when incoming call is declined (#4499) 2025-09-16 09:14:04 +01:00
Doug
f6d3992601 Add the intent system back to call widget URL creation. (#4511)
Add the intent system back to widget URL creation.

Also updates the SDK handling API changes.
2025-09-16 08:36:10 +01:00
Doug
6a12b30897 Revert "Add intent system to widget URL creation. (#4427)" (#4504)
This reverts commit e2bd3edee7.
2025-09-12 10:30:39 +01:00
Copilot
e2bd3edee7 Add intent system to widget URL creation. (#4427)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
2025-09-11 10:03:15 +01:00
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