Commit Graph

4964 Commits

Author SHA1 Message Date
Half-Shot
acef18b26d lint 2024-12-19 11:02:57 +00:00
Half-Shot
3aff86c2c4 Port useReactionsReader hook to ReactionsReader class. 2024-12-19 10:54:40 +00:00
Half-Shot
afc9cb5bbc Merge remote-tracking branch 'origin/livekit' into hs/reactions-viewcallmodel 2024-12-19 10:27:43 +00:00
Hugh Nimmo-Smith
6d5dc0dfb7 Fix loading of matrix-sdk-crypto-wasm when running in local development mode (#2915)
Fixes problem loading rust crypto when using `yarn dev`
2024-12-18 17:03:29 +00:00
Hugh Nimmo-Smith
ba5da7e9af Inform user that their camera is starting in Lobby (#2869)
* Inform user that their camera is starting

Instead of just showing a grey box.

* Review feedback

* Show spinner from design suggestion

* useMemo

* Lint

* Lint

* Feedback from review

* Use colour that actually exists

* Refactor into Avatar superclass

* .

* Remove size limit behaviour

* Add VideoPreview tests
2024-12-18 15:31:45 +00:00
Hugh Nimmo-Smith
19d0f84f02 Introduce intent URL param and make it change the default lobby behaviour (#2828)
* Introduce `intent` URL param and make it change the default lobby behaviour

* Mark skipLobby as deprecated

* Add support for unknown intent which is default for when not specified
2024-12-18 15:30:33 +00:00
Hugh Nimmo-Smith
6b8dddfaaa Bump matrix-js-sdk for bundle improvements (#2911)
Brings in updated version of matrix-sdk-crypto-wasm which helps to reduce bundle size and lazy loading.

Full diff d1de32ea27...e4182eb752
2024-12-18 09:35:42 +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
Half-Shot
7a896f69fd fixup tests with fake timers 2024-12-17 15:02:47 +00:00
Half-Shot
770cd9ddf7 invert 2024-12-17 14:10:12 +00:00
Half-Shot
3a094342d3 filter 2024-12-17 14:04:25 +00:00
Half-Shot
8688907bb6 fix 2024-12-17 12:00:22 +00:00
Half-Shot
a3ed982288 remove mistaken vitest file 2024-12-17 11:52:03 +00:00
Half-Shot
f2165541f1 Merge remote-tracking branch 'origin/livekit' into hs/reactions-viewcallmodel 2024-12-17 11:51:02 +00:00
Half-Shot
f604004856 Add tests for useReactionsReader 2024-12-17 11:45:36 +00:00
Hugh Nimmo-Smith
2b6acb9cce Use afterEach from vitest for consistency (#2908)
This slipped through the PR review. Whilst not harmful, for consistency we use it from vitest.
2024-12-17 11:17:37 +01:00
Half-Shot
4164e0a61f finnish notation 2024-12-17 10:07:42 +00:00
Half-Shot
475ff920b7 lint 2024-12-17 09:59:54 +00:00
Half-Shot
049df91b2f Merge remote-tracking branch 'origin/livekit' into hs/reactions-viewcallmodel 2024-12-17 09:58:25 +00:00
Hugh Nimmo-Smith
79c40f198c Use finnish notation for observables (#2905)
To help make our usage of the observables more readable/intuitive.
2024-12-17 04:01:56 +00:00
Half-Shot
cf858ce83f remove unused helper file 2024-12-16 15:50:59 +00:00
Half-Shot
ada70007cc Merge remote-tracking branch 'origin/livekit' into hs/reactions-viewcallmodel 2024-12-16 15:46:09 +00:00
Half-Shot
5c580bed14 fix a couple of bugs 2024-12-16 15:41:49 +00:00
Half-Shot
5c0b4d4109 lint 2024-12-16 15:29:41 +00:00
Half-Shot
3924429689 Tests all pass. 2024-12-16 15:27:51 +00:00
Robin
e4bd9d7cf9 Merge pull request #2816 from robintown/firefox-audio-output
Support selection of audio output device when using Firefox
2024-12-16 10:14:27 -05:00
Robin
65cf8bf3ee Merge pull request #2899 from robintown/array-performance
Skip some redundant updates to the grid and spotlight
2024-12-16 10:06:52 -05:00
Half-Shot
22ea31dfd8 Adapt reactions test 2024-12-16 14:31:33 +00:00
Half-Shot
a6403d913b Fixup reaction toggle button 2024-12-16 14:26:47 +00:00
Half-Shot
7017f610fc Refactor reactions into a sender and receiver. 2024-12-16 14:18:39 +00: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
renovate[bot]
b822b9f80d Update all non-major dependencies (#2900)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-16 13:44:57 +01:00
ElementRobot
f1fa814fa2 Merge pull request #2898 from element-hq/actions/localazy-download
Localazy Download
2024-12-16 11:53:47 +00:00
Half-Shot
0122f85542 More refactors 2024-12-16 11:29:03 +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
Robin
25d0338f35 Skip some redundant updates to the grid and spotlight
While debugging our layout shift issue I learned that a single change to the sort order of the participants can cause 3 or 4 redundant emissions of the same items in the same order. Since each of these would cause React to re-render the grid, skipping these spurious emissions seems like an easy performance win.
2024-12-13 16:40:20 -05:00
Robin
f9e3fe3176 Use observables for more of the media devices logic 2024-12-13 15:37:29 -05:00
Robin
de276b1fc3 Annotate the default device with a label 2024-12-13 15:22:44 -05:00
Robin
9c57720852 Merge branch 'livekit' into firefox-audio-output 2024-12-13 14:55:27 -05:00
Hugh Nimmo-Smith
a723f10d2c Developer setting to show LiveKit participants that do not have MatrixRTC sessions a.k.a. non-member tiles (#2771)
* make tiles based on rtc member

* display missing lk participant + fix tile multiplier

* add show_non_member_participants config option

* per member tiles

* merge fixes

* linter

* linter and tests

* tests

* adapt tests (wip)

* Remove unused keys

* Fix optionality of nonMemberItemCount

* video is optional

* Mock RTC members

* Lint

* Merge fixes

* Fix user id

* Add explicit types for public fields

* isRTCParticipantAvailable => isLiveKitParticipantAvailable

* isLiveKitParticipantAvailable

* Readonly

* More keys removal

* Make local field based on view model class not observable

* Wording

* Fix RTC members in tes

* Tests again

* Lint

* Disable showing non-member tiles by default

* Duplicate screen sharing tiles like we used to

* Lint

* Revert function reordering

* Remove throttleTime from bad merge

* Cleanup

* Tidy config of show non-member settings

* tidy up handling of local rtc member in tests

* tidy up test init

* Fix mocks

* Cleanup

* Apply local override where participant not yet known

* Handle no visible media id

* Assertions for one-on-one view

* Remove isLiveKitParticipantAvailable and show via encryption status

* Handle no local media (yet)

* Remove unused effect for setting

* Tidy settings

* Avoid case of one-to-one layout with missing local or remote

* Iterate

* Remove option to show non-member tiles to simplify code review

* Remove unused code

* Remove more remnants of show-non-member-tiles

* iterate

* back

* Fix unit test

* Refactor

* Expose TestScheduler as global

* Fix incorrect type assertion

* Simplify speaking observer

* Fix

* Whitespace

* Make it clear that we are mocking MatrixRTC memberships

* Test case for only showing tiles for MatrixRTC session members

* Simplify diff

* Simplify diff

These changes are in https://github.com/element-hq/element-call/pull/2809

* .

* Whitespaces

* Use asObservable when exposing subject

* Show "waiting for media..." when no participant

* Additional test case

* Don't show "waiting for media..." in case of local participant

* Make the loading state more subtle
 - instead of a label we show a animated gradient

* Use correct key for matrix rtc foci in code comment. (#2838)

* Update src/tile/SpotlightTile.tsx

Co-authored-by: Timo <16718859+toger5@users.noreply.github.com>

* Update src/state/CallViewModel.ts

Co-authored-by: Timo <16718859+toger5@users.noreply.github.com>

* Make the purpose of BaseMediaViewModel.local explicit

* Use named object instead of unnamed array for spotlightAndPip

* Refactor spotlightAndPip into spotlight and pip

* Use if statement instead of ternary for readability in spotlight and pip logic

* Review feedback

* Fix tests for CallEventAudioRenderer

* Lint

* Developer setting to show non-member tiles

This is based on top of https://github.com/element-hq/element-call/pull/2701

* Lint

* Remove unused code

* Remove changes that should be in https://github.com/element-hq/element-call/pull/2858

* Update src/state/CallViewModel.test.ts

Co-authored-by: Robin <robin@robin.town>

* Merge branch 'livekit' into toger5/show-non-member-tiles

* Remove unused nonMemberItemCount

* Restore default showNonMemberTiles value after test

* Update comments

---------

Co-authored-by: Timo <toger5@hotmail.de>
Co-authored-by: Timo <16718859+toger5@users.noreply.github.com>
Co-authored-by: Robin <robin@robin.town>
2024-12-13 14:53:08 +00:00
robintown
31be6cc804 Translations updates 2024-12-13 14:28:28 +00:00
Robin
0c66ec5d71 Merge pull request #2894 from robintown/stable-visibility
Determine which tiles are on screen in a more stable manner
2024-12-13 09:16:49 -05:00
Hugh Nimmo-Smith
92813bd3ca Bump matrix-js-sdk (#2897)
So that we get https://github.com/matrix-org/matrix-js-sdk/pull/4575

Full diff: edac6a9983...d1de32ea27
2024-12-13 14:12:29 +00:00
Hugh Nimmo-Smith
e84ecc68b3 Refactor preferences tab strings for consistency (#2888)
* Refactor preferences tab strings for consistency

* Lint
2024-12-13 13:23:32 +00:00
Hugh Nimmo-Smith
7807c44fdc Clean up useMuteStates test (#2891)
We don't need to be mocking React for this test.
2024-12-13 10:09:27 +00:00
fkwp
1cbb6dff81 Merge pull request #2855 from element-hq/renovate/livekit-client
Update dependency livekit-client to v2.7.1
2024-12-13 03:24:44 +01:00
Timo
b993c5eb12 fix linter 2024-12-13 03:23:20 +01:00
Robin
53565ddb76 Test that participants adjust order when screen size changes 2024-12-12 19:16:01 -05:00
Robin
00056a7cd9 Determine which tiles are on screen in a more stable manner
Instead of tracking for each individual tile whether it's visible, just track the total number of tiles that appear on screen. This ought to make the whole thing a lot less dynamic, which is crucial given that our UI renders asynchronously and RxJS doesn't really support cyclic dependencies in any rigorous way.

In particular this ought to make the following kind of situation impossible:
1. There 3 tiles, ABC. A and B are on screen.
2. Now C becomes important. The requested order is now CAB.
3. To reduce the size of the layout shift, the algorithm selects to swap just B and C in the original order, giving ACB. However, the UI is blocked and doesn't render this order yet.
4. For whatever reason, a spurious update of the importance algorithm occurs. It once again requests CAB.
5. Now because the UI was blocked, the layout still thinks that A and B are on screen (rather than A and C). It thinks that C is some weird island of "off-screen territory" in the middle of the tile order. This confuses it into swapping A and C rather than keeping the layout stable.

The reality is that whenever we think N tiles are visible on screen, we're always referring to the first N tiles in the grid. It's best if the code reflects this assumption.
2024-12-12 18:00:59 -05:00
renovate[bot]
4d6740cf2c Update dependency livekit-client to v2.7.5 2024-12-12 19:40:55 +00:00