Commit Graph

100 Commits

Author SHA1 Message Date
Hugh Nimmo-Smith
a63d44af0c Simplify diff
These changes are in https://github.com/element-hq/element-call/pull/2809
2024-11-20 12:28:10 +00:00
Hugh Nimmo-Smith
138a6c7e73 Merge branch 'livekit' into toger5/tiles_based_on_rtc_member 2024-11-20 10:35:49 +00:00
Hugh Nimmo-Smith
fbc2cd3e97 Remove redundant distinctUntilChanged (#2804)
Because this.scope.state() does this for us
2024-11-20 10:31:36 +00:00
Hugh Nimmo-Smith
edb53ae049 Fix 2024-11-20 10:24:38 +00:00
Hugh Nimmo-Smith
8f59f087cc Fix incorrect type assertion 2024-11-20 10:09:27 +00:00
Hugh Nimmo-Smith
f6a641b478 back 2024-11-14 13:51:49 +00:00
Hugh Nimmo-Smith
eafd8fd8b6 Merge branch 'livekit' into toger5/tiles_based_on_rtc_member 2024-11-14 13:42:19 +00:00
Hugh Nimmo-Smith
fa3c9fde14 iterate 2024-11-14 13:34:49 +00:00
Hugh Nimmo-Smith
6e5c468780 Use more explicit names and types for LayoutMedia observables (#2781) 2024-11-14 14:23:50 +01:00
Hugh Nimmo-Smith
44935eeb40 Remove option to show non-member tiles to simplify code review 2024-11-13 10:14:12 +00:00
Hugh Nimmo-Smith
dbbf774443 Merge branch 'livekit' into toger5/tiles_based_on_rtc_member 2024-11-13 09:31:39 +00:00
Robin
50d380cf37 Make one-on-one layout less prone to crashing
The basic issue here, I think, was that the 'oneOnOne' observable flag and the 'onOnOneLayout' observable could become out of sync, as RxJS does *not* have atomicity guarantees. We can work around this by combining them into one observable.
2024-11-11 08:25:16 -05:00
Hugh Nimmo-Smith
02b96fa924 Merge branch 'livekit' into toger5/tiles_based_on_rtc_member 2024-11-11 10:41:11 +00:00
Robin
68d71a8329 Improve interactions to hide/show the footer
This fixes a few different usability issues with the footer:

- When tapping one of the footer buttons, the footer would be dismissed rather than activating the button.
- When the footer was hidden, you could still tap the buttons.
- Interacting with controls in the footer would not reset the timer that hides it, leading to a feeling that the footer can disappear out from under you.
2024-11-08 12:52:55 -05:00
Hugh Nimmo-Smith
886dc2c2fe Avoid case of one-to-one layout with missing local or remote 2024-11-08 06:50:58 +00:00
Hugh Nimmo-Smith
c37c2e50bd Handle no local media (yet) 2024-11-07 17:53:44 +00:00
Hugh Nimmo-Smith
5009f1fe1b Assertions for one-on-one view 2024-11-07 16:53:25 +00:00
Hugh Nimmo-Smith
0c4cddbb32 Apply local override where participant not yet known 2024-11-07 16:23:40 +00:00
Hugh Nimmo-Smith
bf41cfc005 Cleanup 2024-11-07 15:28:55 +00:00
Hugh Nimmo-Smith
6bda8953ab Tidy config of show non-member settings 2024-11-07 14:02:25 +00:00
Hugh Nimmo-Smith
95effe0852 Cleanup 2024-11-07 13:01:48 +00:00
Hugh Nimmo-Smith
0760796024 Remove throttleTime from bad merge 2024-11-07 12:12:10 +00:00
Hugh Nimmo-Smith
9bfd2e371c Revert function reordering 2024-11-07 12:02:32 +00:00
Hugh Nimmo-Smith
e515359344 Lint 2024-11-07 11:33:22 +00:00
Hugh Nimmo-Smith
dfd7273ac6 Duplicate screen sharing tiles like we used to 2024-11-07 11:30:08 +00:00
Hugh Nimmo-Smith
eec44702f7 Make local field based on view model class not observable 2024-11-06 16:33:53 +00:00
Hugh Nimmo-Smith
d8d4e8942c Readonly 2024-11-06 16:07:02 +00:00
Hugh Nimmo-Smith
c829f2f599 Lint 2024-11-06 14:02:09 +00:00
Hugh Nimmo-Smith
733b685e96 Merge branch 'livekit' into toger5/tiles_based_on_rtc_member 2024-11-06 13:42:45 +00:00
Hugh Nimmo-Smith
c45f724279 Show encryption key status from LiveKit (#2700)
* Refactor to make encryption system available in view models

* WIP show encryption errors from LiveKit

* Missing CSS

* Show encryption status based on LK and RTC

* Lint

* Lint

* Fix tests

* Update wording

* Refactor

* Lint
2024-11-06 11:12:46 +00:00
Robin
d3f069e763 Keep tiles in a stable order (#2670)
* Keep tiles in a stable order

This introduces a new layer of abstraction on top of MediaViewModel: TileViewModel, which gives us a place to store data relating to tiles rather than their media, and also generally makes it easier to reason about tiles as they move about the call layout. I have created a class called TileStore to keep track of these tiles.

This allows us to swap out the media shown on a tile as the spotlight speaker changes, and avoid moving tiles around unless they really need to jump between the visible/invisible regions of the layout.

* Don't throttle spotlight updates

Since we now assume that the spotlight and grid will be in sync (i.e. an active speaker in one will behave as an active speaker in the other), we don't want the spotlight to ever lag behind due to throttling. If this causes usability issues we should maybe look into making LiveKit's 'speaking' indicators less erratic first.

* Make layout shifts due to a change in speaker less surprising

Although we try now to avoid layout shifts due to the spotlight speaker changing wherever possible, a spotlight speaker coming from off screen can still trigger one. Let's shift the layout a bit more gracefully in this case.

* Improve the tile ordering tests

* Maximize the spotlight tile in portrait layout

* Tell tiles whether they're actually visible in a more timely manner

* Fix test

* Fix speaking indicators logic

* Improve readability of marbles

* Fix test case

---------

Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2024-11-06 09:36:48 +00:00
Timo
b5208ffeae tests 2024-11-05 12:55:48 +01:00
Robin
98c199d1cf Merge pull request #2690 from robintown/spotlight-speaking
Show speaking indicators in spotlight during screen sharing
2024-11-04 12:36:58 -05:00
Robin
b903e11cfc Fix lint error 2024-11-04 10:56:29 -05:00
Timo
2a5dc60066 merge fixes 2024-11-04 15:38:17 +01:00
Timo
e1e202d7c8 per member tiles 2024-11-04 12:33:15 +01:00
Timo
34e9e8aec3 add show_non_member_participants config option 2024-11-04 12:30:38 +01:00
Timo
3f233a6555 display missing lk participant + fix tile multiplier 2024-11-04 12:29:40 +01:00
Timo
5f8809ce03 make tiles based on rtc member 2024-11-04 12:29:12 +01:00
Hugh Nimmo-Smith
f2ed07c258 Refactor to make encryption system available in view models (#2702) 2024-11-04 09:11:44 +00:00
Robin
8c0280954c Add a button to switch the camera on mobile 2024-11-01 16:00:34 -04:00
Robin
42be187182 Explain why speaking indicators are hidden 2024-11-01 11:25:55 -04:00
Robin
3a706ea3e0 Show speaking indicators in spotlight during screen sharing 2024-10-28 14:45:06 -04:00
Robin
339a98d1e1 Don't cause the local tile to disappear when joining
Before you're connected to the SFU the local participant object will have the empty string as its ID. This changes to your actual ID once you've connected. Apparently I tried to fix this by forcing the local ID to always be the string 'local' but then I just forgot to use it correctly :)
2024-10-24 17:20:56 -04:00
Robin
156f1e3a10 Merge branch 'livekit' into test-call-vm 2024-09-18 22:37:15 -04:00
Robin
016ba676dd Test CallViewModel
This adds tests for a couple of the less trivial bits of code in CallViewModel. Testing them helped me uncover why focus switches still weren't being smooth! (It was because I was using RxJS's sample operator when I really wanted withLatestFrom.)
2024-09-12 15:53:13 -04:00
Robin
ca135d471e React more actively to changes in room membership 2024-09-11 01:27:24 -04: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
Robin
5eaabcf74d Clean up our tests in preparation for the testing sprint (#2466)
* Fix coverage reporting

Codecov hasn't been working recently because Vitest doesn't report coverage by default.

* Suppress some noisy log lines

Closes https://github.com/element-hq/element-call/issues/686

* Store test files alongside source files

This way we benefit from not having to maintain the same directory structure twice, and our linters etc. will actually lint test files by default.

* Stop using Vitest globals

Vitest provides globals primarily to make the transition from Jest more smooth. But importing its functions explicitly is considered a better pattern, and we have so few tests right now that it's trivial to migrate them all.

* Remove Storybook directory

We no longer use Storybook.

* Configure Codecov

Add a coverage gate for all new changes and disable its comments.

* upgrade vitest

---------

Co-authored-by: Timo <toger5@hotmail.de>
2024-08-27 15:45:39 +02:00