Commit Graph

89 Commits

Author SHA1 Message Date
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
Andrew Ferrazzutti
c405b61c66
Wait for a full sync on startup (#2372)
This avoids missing any state not included in the latest cached sync.
2024-05-23 01:00:17 +09:00
Timo
3670c36fac
Fix audio/video device flickering (#2353)
* Make onError a `useCallback`

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
2024-05-02 17:28:36 +02:00
Timo
5284479ece
Knocking support (#2281)
* Add joining with knock room creation flow.

Also add `WaitForInviteView` after knocking.
And appropriate error views when knock failed or gets rejected.

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

* Refactor encryption information.

We had lots of enums and booleans to describe the encryption situation.
Now we only use the `EncryptionSystem` "enum" which contains the
additional information like sharedKey. (and we don't use the isRoomE2EE
function that is somewhat confusing since it checks `return widget ===
null && !room.getCanonicalAlias();` which is only indirectly related to
e2ee)

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

* Update recent list.

- Don't use deprecated `groupCallEventHander` anymore (it used the old
  `m.call` state event.)
- make the recent list reactive (getting removed from a call removes the
  item from the list)
- support having rooms without shared secret but actual matrix
  encryption in the recent list
- change the share link creation button so that we create a link with
  pwd for sharedKey rooms and with `perParticipantE2EE=true` for matrix
  encrypted rooms.

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

* fix types

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

* patch js-sdk for linter

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

* ignore ts expect error

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

* Fix error in widget mode.

We cannot call client.getRoomSummary in widget mode. The code path needs
to throw before reaching this call. (In general we should never call
getRoomSummary if getRoom returns a room)

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

* tempDemo

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

* remove wait for invite view

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

* yarn i18n

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

* reset back mute participant count

* add logic to show error view when getting removed

* include reason whenever someone gets removed from a call.

* fix activeRoom not beeing early enough

* fix lints

* add comment about encryption situation

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

* Fix lockfile

* Use (unmerged!) RoomSummary type from the js-sdk

Temporarily change the js-sdk dependency to the PR branch that provides
that type

* review

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

* review (remove participant count unknown)

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

* remove error for unencrypted calls (allow intentional unencrypted calls)

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

* update js-sdk

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

---------

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
2024-04-23 22:15:13 +09:00
Timo
c4075f736f
Federated room joins (#2188) 2024-02-21 15:41:59 +01:00
Robin
7f571b695e Remove the gappy sync hack
This hack was added in the early days of Element Call, back when we were doing call signaling using non-state room events, and missing part of a room's history could cause calls to fall apart. Nowadays we use state events for signaling, and all this hack is doing is making sync times unnecessarily long, so we can remove it.
2024-01-20 15:55:45 -05:00
David Baker
92d61fa0f1 Hide rooms we don't have the key for in recents list 2023-11-16 16:32:25 +00:00
David Baker
c65ce86001 Update for renamed function
and new js-sdk containing it
2023-10-30 16:55:16 +00:00
David Baker
f04beab99f Make e2ee type clearer hopefully 2023-10-23 12:10:25 +01:00
David Baker
9126fb3f3e Fix key format on the wire to be base64 2023-10-20 17:31:15 +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
David Baker
df93fb4a3f Add comment 2023-10-09 16:35:27 +01:00
David Baker
6faceb07cd Log if password needed url encoding 2023-10-09 16:28:48 +01:00
David Baker
0892edc432 Use base64url encoding for the password param
As base64 is fairly obviously not sensible for URLs and we were not
URL encoding it so we were ending up with spaces in the URL.

Also base 64 encode the password in case, as per comment.
2023-10-09 10:08:10 +01:00
David Baker
87d5062d34 Don't use js-sdk's base64 encode function
It uses the NodeJS Buffer global which presumably is provided by
Webpack in element-web but isn't here, apparently.
2023-10-05 17:57:23 +01:00
David Baker
d373081db1 Generate call passwords with secure RNG 2023-10-05 17:32:43 +01:00
David Baker
e63721acea Refactor room creation code a little
We c+ped the code to create room passwords between two places, but we
already had a createRoom utility function that knew about e2ee.
2023-10-05 16:44:31 +01:00
David Baker
c546042d18 Use the loglevel library's extensions
...instead of monkey patching the console log objects. We use a logging
framework everywhere now (this fixes the times when we didn't...)
so there's not really a reason to do this the hacky way anymore.

This means that log lines now appear to come from whatever else is
intercepting the logger (eg. sentry) rather than rageshake.ts.

Opinions on this welcome on whether it's better or not.
2023-09-25 18:04:34 +01: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
83fdb094d5 Factor out common function to generate the URLs 2023-09-19 18:55:33 +01:00
David Baker
2753f04f0b Include the room name in the generated URL 2023-09-19 18:23:44 +01:00
Robin
1e9e096356 Fully remove walkie-talkie mode 2023-09-18 11:06:06 -04:00
David Baker
1716bd4418 Merge remote-tracking branch 'origin/livekit' into dbkr/matrixrtcsession 2023-08-16 18:53:00 +01:00
David Baker
4242d45ba2 WIP refactor for removing m.call events 2023-08-16 18:41:27 +01:00
Šimon Brandner
b2f5f90f37
More URL handling adjustements
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-08-11 13:16:35 +02:00
Šimon Brandner
5c3d8efebf
Improve URL handling
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-08-10 15:19:43 +02:00
Šimon Brandner
80f97cba32
Fix getRoomUrl()
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-08-09 14:01:36 +02:00
Šimon Brandner
7ace81a7cc
Make copy link button include a password
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-08-09 14:01:35 +02:00
David Baker
47365f2433 Merge branch 'toger5/connectionLostBanner' into connectionlostbanner_lk
NB. I had to more or less rewrite this as it had been refactored in the livekit branch.
2023-07-21 20:03:37 +01:00
Šimon Brandner
723819b3d6
Merge remote-tracking branch 'upstream/livekit' into SimonBrandner/feat/friendly-url
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-07-15 09:48:08 +02:00
Daniel Abramov
0105162ffa Enable strict lints
An attempt to fix https://github.com/vector-im/element-call/issues/1132
2023-07-11 16:02:58 +01:00
Šimon Brandner
607e1b7b43
Fix getRoomUrl()
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-07-06 12:02:39 +02:00
Šimon Brandner
fdc41aaa50
Use friendly URLs
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-07-03 16:20:19 +02:00
David Baker
30e1034fba Use new-js-sdk flag to disable the actual calling of group calls
In favour of using livekit
2023-06-14 12:13:55 +01:00
Robin Townsend
ab97f12947 Merge branch 'main' into livekit-experiment 2023-06-09 17:22:34 -04:00
Timo K
14a32c0fb3 connection lost banner
if there is no connection to the home server

Signed-off-by: Timo K <toger5@hotmail.de>
2023-06-09 19:18:30 +02:00
Daniel Abramov
e032edbfad Make LiveKit configurable 2023-06-07 20:16:24 +02:00
Daniel Abramov
b11ab01bbe Remove the unused exports with help of ts-prune 2023-06-05 19:11:38 +02:00
Enrico Schwendig
29e41c7227
Allow Element Call to be started without audio / video interface (#924)
* config: add feature in `config.json`

* groupCall: adjust connection state in feed if allowCallWithoutVideoAndAudio

* matrix-js-sdk: update version for allowCallWithoutVideoAndAudio

- I modified the SDK so that mute unmute work without media and check device permission inside the SDK
- allowCallWithoutVideoAndAudio is only checked at one point outside the SDK

* docu: add join group call without media docu in READMe

---------

Co-authored-by: Robin Townsend <robin@robin.town>
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-03-02 18:48:32 +01:00
David Baker
64703fd3cc
Typo
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-02-28 14:09:52 +00:00
David Baker
53bc8eb82f Behave sensibly if a full room alias is entered
Check explicitly to see if the room name that's enetered into the box
looks like a room alias and if so, do the sensible thing.

Fixes https://github.com/vector-im/element-call/issues/852
2023-02-28 13:50:24 +00:00
Šimon Brandner
3d0906a145
Merge remote-tracking branch 'upstream/main' into feature_sfu
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-01-25 17:13:01 +01:00
David Baker
7e1033f5a4
Add colon in comment
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-01-20 09:35:50 +00:00
David Baker
524f530dce Lowercase room alias before joining 2023-01-19 19:20:42 +00:00
Šimon Brandner
4e64c71a4c
Merge remote-tracking branch 'upstream/main' into feature_sfu
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-01-13 17:40:05 +01:00
David Baker
5f26534496 Use IndexedDB storage in dev mode, just without the worker
As per comment, we can't use workers in Vite dev mode. We previously
fell back to the memory store but this ends up with it working significantly
differently in dev mode to production, eg. dev mode would always start
by doing an initial sync, so old to-device messages would arrive again.

There's no need to fall all the way back to the memory store though,
we can use the IndexedDB store without the worker.
2023-01-12 15:17:46 +00:00
David Baker
9adde2fde5 Merge remote-tracking branch 'origin/main' into feature_sfu 2023-01-03 22:59:26 +00:00
David Baker
df9c1fed2a Fix copyright headers
This is an Element project (in the vector-im repo) so the Copyright
should be for New Vector: it was incorrectly attributed to the
foundation for some files (and some files were missing headers).
2023-01-03 16:55:26 +00:00
David Baker
795566ccef Null check 2022-12-21 18:12:53 +00:00