40 Commits

Author SHA1 Message Date
Timo
28246ef86b Update RTCSession configuration to non deprecated names. (#3267)
* Update RTCSession configuration to non deprecated names.

* bump js-sdk

* es2024 and array buffer adaptions

* Alternative without `createKeyMaterialFromBuffer`
2025-05-19 18:04:07 +02:00
Timo
3c0d81844f Add option to enable to-device-encryption (#3167)
* enable to-device-encryption

* add logging for key provider

* make rooms encrypted

* add dev setting to choose to-device or room encryption

* add indicator when to-device is used.
2025-04-11 10:07:50 +02:00
Robin
33700d1529 Merge branch 'livekit' into toger5/src-to-lib-import 2025-03-27 14:35:08 -04:00
Robin
0ed1564d3e Merge branch 'livekit' into robin/posthog-logout 2025-03-24 10:10:28 -04:00
Timo
adb5934f0b temp 2025-03-13 17:51:41 -04:00
Timo
750db09156 Use the New MatrixRTCSession MembershipManager (#3015)
* provide option to use the New MembershipManager

* fix cryptoApi import change

* add error screen

* bump js-sdk

* rename to `setUnrecoverableError` and remove onLeave call because that will be handled by an effect.

* this was doing nothing (it is a fragment back when there was no deprecated `rtcSession.room`)

* rename to error

* Update src/utils/errors.ts

Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>

* Update src/utils/errors.ts

Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>

* review

* bump js-sdk

* expose lk log level changing in `window`

* bump js-sdk
 - always log "Missing own membership: force re-join"
 - also check insertions queue

* change lk log level to warn

* Bump js-sdk

* Bump js-sdk

* .

* Bump js-sdk

* show user count based on meberships not users.

Signed-off-by: Timo K <toger5@hotmail.de>

* bump js-sdk

* rename setting name

* remove unused import

* js sdk bump

* remove `window.setLKLogLevel`

* bump js sdk with reverted incompatible change

* bump js-sdk with one less merge

---------

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2025-03-07 16:27:04 +00:00
Robin
b5f5ab329a Merge pull request #3051 from element-hq/robin/return-to-lobby
Respect the returnToLobby flag
2025-03-05 12:17:53 -05:00
Robin
5b1ea4501d Send a 'join' action when entering the call
Following a75952cf77, this is one more upgrade to the widget communication that I'd like to make within this release cycle.

The motivating issue is https://github.com/element-hq/element-web/issues/29429. Fundamentally, without a 'join' action, the only info Element Web can use to determine whether it's joined the call is whether a MatrixRTC membership exists. But membership state events can inaccurately represent the client's actual state (whether because delayed events aren't supported, or because the delayed event hasn't timed out yet), so I suggest we send a 'join' action here just as we do in the Element Web Jitsi wrapper (e9a3625bd6/src/vector/jitsi/index.ts (L503)) to let Element Web tap directly into the widget's local state. (This will need additional Element Web changes, but is certainly backwards compatible.)
2025-03-05 09:25:52 -05:00
Robin
4919410ff0 Don't reset analytics ID when leaving calls
We shouldn't be calling PosthogAnalytics.instance.logout() when leaving the call in widget mode, because all this does is reset your analytics ID. In the big picture this is probably inflating our user count metrics.
2025-03-05 08:55:47 -05:00
Robin
28c45c6107 Avoid closing the widget in returnToLobby mode
If returnToLobby is enabled then we obviously want to keep the widget open once the user leaves the call.
2025-03-05 07:32:25 -05:00
Valere
f8a5de604f review: rename ec-error file to error 2025-02-28 12:04:49 +01:00
Valere
2ba803fcef review: Improve error structure + better RTCFocus error message 2025-02-27 09:26:38 +01:00
Valere
3c23e5a4e6 Error Handling: gracefully handle missing livekit service url in config 2025-02-26 15:19:08 +01:00
Robin
518c8eadca Finish the hangup procedure even if widget API throws errors 2025-02-24 11:48:05 +07:00
Robin
a75952cf77 Send a 'close' action when the widget is ready to close
By keeping 'hangup' and 'close' as separate actions, we can allow Element Call widgets to stay on an error screen after the user has been disconnected without the widget completely disappearing from the host's UI. We don't have to request any additional capabilities to use a custom widget action like this one.
2025-02-20 11:17:17 +07:00
Hugh Nimmo-Smith
0f5dc33918 Fix copyright header to say dual license not just AGPL (#3013)
This probably should have been part of https://github.com/element-hq/element-call/pull/2984
2025-02-18 17:59:58 +00:00
Hugh Nimmo-Smith
53fff37d5d Use AutoDiscovery.getRawClientConfig() instead of MatrixClient.getClientWellKnown() (#2906)
I'm open to suggestions on what is sensible to test around this...
2024-12-17 17:44:50 +01:00
Timo
ed269e0711 Revert "Wait for .well-known/matrix/client to load before determining MatrixRTC foci" (#2902)
This reverts commit 92afd5d63a.
2024-12-16 14:12:12 +00:00
Hugh Nimmo-Smith
92afd5d63a Wait for .well-known/matrix/client to load before determining MatrixRTC foci (#2901) 2024-12-16 11:22:23 +00:00
Will Hunt
77facd01e4 Add support for playing a sound when the user exits a call. (#2860)
* Refactor to use AudioContext

* Remove unused audio format.

* Reduce update frequency for volume

* Port to useAudioContext

* Port reactionaudiorenderer to useAudioContext

* Integrate raise hand sound into call event renderer.

* Simplify reaction sounds

* only play one sound per reaction type

* Start to build out tests

* fixup tests / comments

* Fix reaction sound

* remove console line

* Remove another debug line.

* fix lint

* Use testing library click

* lint

* Add support for playing a sound when the user exits a call.

* Port GroupCallView to useAudioContext

* Remove debug bits.

* asyncify

* lint

* lint

* lint

* tidy

* Add test for group call view

* Test widget mode too.

* fix ?.

* Format

* Lint

* Lint

---------

Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2024-12-12 07:33:47 +00:00
Hugh Nimmo-Smith
0087e37f30 Enable @typescript-eslint/consistent-type-imports lint rule (#2886)
* Enable @typescript-eslint/consistent-type-imports lint rule

This is to help ensure that we get proper vite/rollup lazy loading by not `import`ing more than we need to.

Revert "Enable @typescript-eslint/consistent-type-imports lint rule"

This reverts commit ba385fa00b7e410cc508fd5fb9fe972233ae114f.

Enable @typescript-eslint/consistent-type-imports lint rule

This is to help ensure that we get proper vite/rollup lazy loading by not `import`ing more than we need to.

.

* Format
2024-12-11 09:27:55 +00:00
Hugh Nimmo-Smith
8be6655d8b Add matrix_rtc_session config options + bump js-sdk (#2756)
* Add matrix_rtc_session config options
* Bump js-sdk

6971e7beba...fcb69b16ad

Also brings in:

- https://github.com/matrix-org/matrix-js-sdk/pull/4342
- https://github.com/matrix-org/matrix-js-sdk/pull/4494
2024-11-11 16:53:37 +00:00
Timo
c3edd3e25e Enable lint rules for Promise handling to discourage misuse of them. (#2607)
* Enable lint rules for Promise handling to discourage misuse of them.
Squashed all of Hugh's commits into one.

---------

Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2024-09-10 09:49:35 +02:00
fkwp
9add3e52c4 Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
Andrew Ferrazzutti
34c7d02de2 Add config to send session membership state events (#2460)
If not set, legacy call membership state events are sent instead.
Even if set, legacy events are sent in rooms with active legacy calls.

---------

Co-authored-by: Timo <16718859+toger5@users.noreply.github.com>
2024-07-05 21:10:16 +09:00
Timo
812ae2ce89 Load focus information from well known and use client config only as a fallback. (#2358)
* Load focus information from well known and use client config only as a fallback.

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
2024-06-19 16:41:52 +02:00
Timo
db859d43e9 Refactor livekit disconnect to use an effect hook. (#1925)
---------

Signed-off-by: Timo K <toger5@hotmail.de>
2023-11-28 19:07:08 +01:00
Timo
b17a76ac1a Hotfix for hangup disconnect screen (#1921)
-  we cannot disconnect livekit before ending the rtcsession.

Signed-off-by: Timo K <toger5@hotmail.de>
2023-11-27 14:08:39 +01:00
Timo
005b0bfa5e Fix not disconnecting from livekit session. (#1920)
Signed-off-by: Timo K <toger5@hotmail.de>
2023-11-24 17:53:15 +01:00
David Baker
731f1e4008 Merge pull request #1772 from vector-im/dbkr/ppe2ee
Support key-per-participant e2ee
2023-10-31 20:08:05 +00:00
Timo
441ad5bf2c Fix not hanging up when using the close button (EXA EXI) (#1840)
---------

Signed-off-by: Timo K <toger5@hotmail.de>
2023-10-30 17:30:30 +01:00
David Baker
2d5b4dbc57 Merge remote-tracking branch 'origin/livekit' into dbkr/ppe2ee 2023-10-26 10:29:12 +01:00
Timo
8356b722a6 Add limit condition to sync loop and add more logging what is actually going on. (#1775)
---------

Signed-off-by: Timo K <toger5@hotmail.de>
2023-10-25 13:44:33 +02:00
David Baker
15d3e7574d Re-apply Simon's emebdded e2ee work on latest livekit branch
Replaces https://github.com/vector-im/element-call/pull/1350
2023-10-16 17:45:06 +01:00
Robin
614bc82402 Format code 2023-10-11 10:42:04 -04:00
Robin
cc6f1f8631 Merge branch 'livekit' into eslint-upgrade 2023-10-11 10:30:57 -04:00
Timo
d5edcce470 Fix mute button not being in sync with actual video/audio feed. (#1721)
* Fix mute button not being in sync with actual video/audio feed.
This happens if we toggle the button while waiting for updating the stream.
It is prohibited by checking if the stream state is in sync after the update
is done.
Signed-off-by: Timo K <toger5@hotmail.de>


---------

Signed-off-by: Timo K <toger5@hotmail.de>
2023-10-10 14:14:39 +02:00
Timo
63a00eef2f await leave rtc session (#1648)
so that the widget is only getting the hangup even,
once the call has been cleaned up

Signed-off-by: Timo K <toger5@hotmail.de>
2023-10-04 18:27:07 +02:00
Robin
a7624806b2 Upgrade eslint-plugin-matrix-org to 1.2.1
This upgrade came with a number of new lints that needed to be fixed across the code base. Primarily: explicit return types on functions, and explicit visibility modifiers on class members.
2023-09-22 18:07:06 -04:00
David Baker
e39d00154d More hacking on rtcsession 2023-08-18 09:03:21 +01:00