element-call/src
Robin Townsend f1ee3604de Make Element Call work in Firefox's resist fingerprinting mode
This one is gonna take some explaining:

When in resist fingerprinting mode, Firefox exhibits some funny behavior: when we ask for the the list of media devices, it gives us fake device IDs. But when the js-sdk requests a stream for any of those devices, Firefox associates the stream with the real device ID.

Now, in order to get the names of devices included in their metadata when you query the device list, you need to be holding a stream. For this reason, useMediaHandler was set up to reload the device list whenever matrix-js-sdk got a new local stream. But because of the inconsistency in device IDs, it would enter an infinite cycle telling matrix-js-sdk to request a stream for the fake device ID, but with matrix-js-sdk always responding with the real device ID.

I already wasn't happy with useMediaHandler's use of @ts-ignore comments to inspect private js-sdk fields, and in the meantime we've come up with a simpler function for requesting device names, so I decided to refactor useMediaHandler to use it instead. Importantly, it doesn't break in resist fingerprinting mode.

This created a new UX issue though: now, when on the lobby screen, useMediaHandler would request microphone access so it could get device names, followed immediately by a *second* pop-up for the lobby screen to request camera access. That's 1 pop-up too many, so I changed useMediaHandler to only request device names when a component is mounted that actually wants to show them. Currently, the settings modal is the only such component, and users normally only open it *after* granting full audio/video access, so this solution works out quite nicely.
2023-05-15 23:13:18 -04:00
..
@types
analytics Peer connections count in posthog media summary (#1046) 2023-05-15 10:55:36 +02:00
auth Initial cut of required tags for registration and login flows. 2023-05-03 14:42:44 +01:00
button
config Fix confusing comment 2023-03-31 11:12:10 +01:00
form
home RegisteredView needs data tags as not reused from UnregisteredView. 2023-05-05 11:46:05 +01:00
icons Add a range of data-testid tags to be able to cleanly identify parts of the application. 2023-04-27 09:42:25 +01:00
input
otel add audio concealment to posthog exporter (#1042) 2023-05-14 16:36:41 +02:00
popover
profile Work around data-testid issue by tagging the icon not the Item. 2023-05-03 18:07:06 +01:00
room Make Element Call work in Firefox's resist fingerprinting mode 2023-05-15 23:13:18 -04:00
settings Make Element Call work in Firefox's resist fingerprinting mode 2023-05-15 23:13:18 -04:00
sound
tabs
typography
video-grid Merge pull request #1053 from robintown/local-tile-size 2023-05-13 13:54:40 -04:00
App.tsx
Avatar.module.css
Avatar.tsx
ClientContext.tsx Don't call posthog before its initialised 2023-04-05 15:00:14 +01:00
Facepile.module.css
Facepile.tsx
FullScreenView.module.css
FullScreenView.tsx
Header.module.css
Header.stories.jsx
Header.tsx Prettier 2023-05-11 15:16:17 +01:00
IncompatibleVersionModal.tsx
index.css
IndexedDBWorker.ts
initializer.tsx
LazyEventEmitter.ts
ListBox.module.css
ListBox.tsx
main.tsx
matrix-utils.ts
media-utils.ts Make Element Call work in Firefox's resist fingerprinting mode 2023-05-15 23:13:18 -04:00
Menu.module.css
Menu.tsx
Modal.module.css
Modal.tsx Test tags for invite links; joining call by UR:; getting call name. 2023-05-11 14:30:32 +01:00
olm.ts
SequenceDiagramViewerPage.tsx
Tooltip.module.css
Tooltip.tsx
TranslatedError.ts
UrlParams.ts
useCallViewKeyboardShortcuts.ts Fix audio mute on window blur 2023-04-21 10:18:43 +01:00
useDelayedState.ts
useEvents.ts
useLocationNavigation.ts
useMergedRefs.ts
usePageFocusStyle.module.css
usePageFocusStyle.ts
usePageTitle.ts
usePrefersReducedMotion.ts
useReactiveState.ts
UserMenu.module.css
UserMenu.tsx Work around data-testid issue by tagging the icon not the Item. 2023-05-03 18:07:06 +01:00
UserMenuContainer.tsx
widget.ts