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 Merge pull request #819 from vector-im/dbkr/prefix_other_fullscreen_apis 2023-01-03 22:56:49 +00:00
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 Fix copyright headers 2023-01-03 16:55:26 +00:00
config Fix confusing comment 2023-03-31 11:12:10 +01:00
form Opt into analytics by default during the beta 2023-03-13 19:12:47 -04:00
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 Checkbox for analytics opt in & settings redesign (#934) 2023-03-01 13:47:36 +01:00
otel add audio concealment to posthog exporter (#1042) 2023-05-14 16:36:41 +02:00
popover Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
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 Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
tabs Opt into analytics by default during the beta 2023-03-13 19:12:47 -04:00
typography Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
video-grid Merge pull request #1053 from robintown/local-tile-size 2023-05-13 13:54:40 -04:00
App.tsx Async config file (#682) 2022-11-03 19:43:41 +01:00
Avatar.module.css Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
Avatar.tsx Fix copyright headers 2023-01-03 16:55:26 +00:00
ClientContext.tsx Don't call posthog before its initialised 2023-04-05 15:00:14 +01:00
Facepile.module.css Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
Facepile.tsx Enable users to join calls from multiple devices 2022-11-21 12:39:48 -05:00
FullScreenView.module.css Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
FullScreenView.tsx Fix copyright headers 2023-01-03 16:55:26 +00:00
Header.module.css Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
Header.stories.jsx Fix storybook 2022-01-21 15:42:21 -08:00
Header.tsx Prettier 2023-05-11 15:16:17 +01:00
IncompatibleVersionModal.tsx Make onClose required in Modal 2022-11-07 12:23:21 +00:00
index.css Add URL params to control fonts 2022-12-09 14:31:13 -05:00
IndexedDBWorker.ts Fix copyright headers 2023-01-03 16:55:26 +00:00
initializer.tsx Wait until config is loaded to load otel 2023-03-22 12:41:33 +00:00
LazyEventEmitter.ts Fix copyright headers 2023-01-03 16:55:26 +00:00
ListBox.module.css Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
ListBox.tsx Add import 2022-11-23 10:11:55 +00:00
main.tsx Actually remove Matrix Video Chat branding for real 2022-11-09 17:23:22 -05:00
matrix-utils.ts Allow Element Call to be started without audio / video interface (#924) 2023-03-02 18:48:32 +01:00
media-utils.ts Make Element Call work in Firefox's resist fingerprinting mode 2023-05-15 23:13:18 -04:00
Menu.module.css Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
Menu.tsx Revert "Yarn upgrade" 2023-02-02 14:32:44 +00:00
Modal.module.css Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
Modal.tsx Test tags for invite links; joining call by UR:; getting call name. 2023-05-11 14:30:32 +01:00
olm.ts Ensure that Olm is only loaded once 2022-10-31 13:43:03 -04:00
SequenceDiagramViewerPage.tsx Set up translation with i18next 2022-10-12 14:53:49 -04:00
Tooltip.module.css Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
Tooltip.tsx Make tooltips look more like Element Web's 2022-09-26 20:17:55 -04:00
TranslatedError.ts Set up translation with i18next 2022-10-12 14:53:49 -04:00
UrlParams.ts Posthog widget embedding (#767) 2022-12-19 12:16:59 +01:00
useCallViewKeyboardShortcuts.ts Fix audio mute on window blur 2023-04-21 10:18:43 +01:00
useDelayedState.ts Fix waiting state not disappearing after the 20 second timeout 2022-06-14 23:38:40 -04:00
useEvents.ts Fix lints 2022-11-28 16:15:47 -05:00
useLocationNavigation.ts Fix copyright headers 2023-01-03 16:55:26 +00:00
useMergedRefs.ts Add missing copyright headers 2023-02-15 16:20:58 -05:00
usePageFocusStyle.module.css Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
usePageFocusStyle.ts Fix copyright headers 2023-01-03 16:55:26 +00:00
usePageTitle.ts Don't touch the product name option for now 2022-12-20 17:30:47 +00:00
usePrefersReducedMotion.ts Disable animations for users that prefer reduced motion 2022-10-31 11:46:17 -04:00
useReactiveState.ts Document useReactiveState 2023-02-15 16:38:49 -05:00
UserMenu.module.css Fix copyright pt. 2: CSS files 2023-01-03 16:58:38 +00:00
UserMenu.tsx Work around data-testid issue by tagging the icon not the Item. 2023-05-03 18:07:06 +01:00
UserMenuContainer.tsx Fix copyright headers 2023-01-03 16:55:26 +00:00
widget.ts Add e2eEnabled parameter to Widget client 2023-03-01 14:30:25 +01:00