Commit Graph

2180 Commits

Author SHA1 Message Date
Timo
46f5c44db0 temp2 2025-03-13 18:00:07 -04:00
Timo
adb5934f0b temp 2025-03-13 17:51:41 -04:00
Valere Fedronic
90a282b46c Merge pull request #3063 from element-hq/valere/fix_add_close_button_in_widget_mode
Error: use a close button instead of go to home when in widget mode
2025-03-13 10:16:26 +01:00
Valere Fedronic
79e294755c Merge pull request #3058 from element-hq/valere/refactor_error_handling
refactor: Centralize group call errors in custom GroupCallErrorBoundary
2025-03-13 10:12:11 +01:00
Hugh Nimmo-Smith
7aac56aac0 Vite embedded build of Element Call (#3077)
* Embedded package build of Element Call

Part of https://github.com/element-hq/element-call/issues/2994

This creates a new "embedded" build (vs "full" build) at the vite level. It will be used by a later PR that actually provides platform specific packages.

Embedded build:

- Uses relative URLs
- Uses relative config.json path and other resource loading
- Has a config.json built in
- Doesn't include the public folder (e.g. favicon)

Out of scope:

- this doesn't attempt to exclude SPA functionality, so technically the build could be used in SPA
- the above means that the crypto-wasm binary is included in the build

* CI artifact name based on type of build

* Update src/config/Config.ts
2025-03-12 17:00:44 +00:00
Hugh Nimmo-Smith
520c0f4925 Fix typing on config: EULA is optional as it has a default (#3074) 2025-03-12 13:52:13 +01:00
Valere
b02ad8871e review: Make widget prop mandatory 2025-03-12 10:27:45 +01:00
Valere
b0a4a954f8 Error: use a close button instead of go to home when in widget mode 2025-03-12 10:12:34 +01:00
Valere
612ace137a code review: recoveryActionHandler should not be optional 2025-03-12 09:44:41 +01:00
Valere
8584521ade fixup: post rebase fix 2025-03-11 20:19:14 +01:00
Valere
c0ef6e5e4d fix: Error recover/retry buttons should reset error state 2025-03-11 16:54:19 +01:00
Valere
4c27551014 refactor: Centralize group call errors in custom GroupCallErrorBoundary 2025-03-11 16:54:19 +01:00
Hugh Nimmo-Smith
1a692b983a Use fetch() in a way that works for file URLs (#3071)
fetch returns a response code of 0 when it successfully loads a `file://` resource.

This means we can't just rely on `response.ok`.

Required for https://github.com/element-hq/element-call/issues/2994
2025-03-11 10:39:51 +01:00
Hugh Nimmo-Smith
30b5bcdfb6 Cache calls to removeHiddenChars() to fix performance bottleneck in Safari (#3066)
* Cache calls to removeHiddenChars() as very slow on Safari

Fixes #3065

* Test

* Split testing for removeHiddenChars
2025-03-10 13:55:03 +00:00
Timo
b635b00b0c Expose setLKLogLevel to window for debugging. (#3064)
* Expose setLKLogLevel to window for debugging.

* fix es lint
2025-03-10 08:59:27 +00: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
Timo
c9f2a1c943 Reduce redundant calculations of display name map (#3062)
* Use share() on fromEvent() so that we multiplex subscribers onto the event emitter

* .

* .

* Comment

* Comment

---------

Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2025-03-07 10:18:28 +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
359812d8b1 Explain why returnToLobby is false in SPA 2025-03-05 10:40:37 -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
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
Robin
b5f5edba09 Fix the control flow of GroupCallView render function
2bb5b020e6 refactored the end of the GroupCallView render function to not use any early returns, and clumsily failed to account for the fall-through case that makes returnToLobby work (as opposed to sitting on a blank screen).
2025-03-05 07:29:56 -05:00
Timo
939eac5a66 change lk log level to warn (#3049) 2025-03-04 19:37:51 +01:00
Robin
e783339557 Merge pull request #3035 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2025-03-04 00:14:56 -05:00
Robin
db9f255a4a Update formatting 2025-03-03 23:41:29 -05:00
Valere
4c91326edb fix, testing: i18n not properly configured 2025-03-03 14:41:31 +01:00
Valere
f38adf12d9 review: remove not yet used case ErrorCategory in rich error 2025-02-28 12:25:35 +01:00
Valere
5dfc89d36c fixup: lint error 2025-02-28 12:24:43 +01:00
Valere
1fbf8e2686 review: Report unknown exceptions when entering RTC session 2025-02-28 12:17:28 +01:00
Valere
f8a5de604f review: rename ec-error file to error 2025-02-28 12:04:49 +01:00
Valere
4701e413fd fixup: MissingRTCFocus error, fix confusion between domain/brand 2025-02-27 10:09:26 +01:00
Valere
2ba803fcef review: Improve error structure + better RTCFocus error message 2025-02-27 09:26:38 +01:00
Valere
109809182f fixup: Unused (yet) ErrorCode enum value 2025-02-26 15:37:28 +01:00
Valere
3c23e5a4e6 Error Handling: gracefully handle missing livekit service url in config 2025-02-26 15:19:08 +01:00
Valere
7423dfa527 refactor: Introduce specific ElementCall error type with code 2025-02-26 14:58:31 +01:00
Robin
31577d7263 Show an error screen when the SFU is at capacity (#3022)
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: fkwp <fkwp@users.noreply.github.com>
2025-02-26 12:00:56 +00:00
Robin
2bb5b020e6 Leave session when error occurs and show error screens in widget mode (#3021)
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
2025-02-26 10:20:30 +00:00
Robin
cd05df3e33 Merge pull request #3020 from element-hq/robin/clarify-use-latest
Clarify what useLatest is for
2025-02-24 18:22:46 +07:00
Robin
9b59544db2 Clarify what useLatest is for
I was touching this file and noticed a chance to clean up this little TODO comment by swapping in our useLatest hook and giving it better documentation.
2025-02-24 18:18:15 +07:00
Robin
e4d7baf7bb Actually hide the header on error pages
Currently, if you set hideHeader to true, you get a big empty <header> on error pages which serves no purpose except to push the screen's content off center.
2025-02-24 17:37:11 +07:00
Robin
832a5aaf57 Merge pull request #3011 from element-hq/robin/close-action
Send a 'close' action when the widget is ready to close
2025-02-24 17:23:33 +07:00
Robin
518c8eadca Finish the hangup procedure even if widget API throws errors 2025-02-24 11:48:05 +07:00
Robin
028b3104e4 Merge pull request #3009 from element-hq/renovate/livekit-client
Update dependency livekit-client to v2.9.1
2025-02-20 13:24:17 +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
Timo
4015efa6c6 fix lk usage in test 2025-02-20 06:33:01 +03: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
294e67a5ba Show current SFU and Server Info in developer tab (#3000)
* Show current SFU and Server Info in developer tab

* Lint
2025-02-10 18:22:19 +01:00
Timo
bff2b73c85 Bump matrix-js-sdk to v36.1.0 (#2967)
Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2025-02-03 12:28:12 +00:00
Will Hunt
1dde54daa9 Use matrixIdentifier for screenshare (#2981) 2025-02-03 10:17:19 +00:00
Will Hunt
3506ca7feb Fix calculation of local membership identifier (#2966) 2025-01-23 13:42:29 +00:00