...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.
This attempts to converge all our modals on the new modal component while changing their designs as little as possible. This should reduce the bundle size a bit and make the app generally feel like it's converging on the new designs, even though individual modals still remain to be revamped.
As per comment, livekit mutates the object that's passed in, so
we ended up re-requesting the devices in the next render because we
effectively passed in different options.
To track media devices, we were previously relying on a combination of LiveKit's useMediaDeviceSelect hook, and an object called UserChoices. Device settings should be accessible from outside a call, but the latter hook should only be used with a room or set of preview tracks, so it couldn't be raised to the app's top level. I also felt that the UserChoices code was hard to follow due to lack of clear ownership of the object.
To bring clarity to media device handling and allow device settings to be shown outside a call, I refactored these things into a single MediaDevicesContext which is instantiated at the top level of the app. Then, I had to manually sync LiveKit's device state with whatever is present in the context. This refactoring ended up fixing a couple other bugs with device handling along the way.
This could fix "muted on join issues" but could introduce issues where the buttons show unmuted even if no device is available.
Signed-off-by: Timo K <toger5@hotmail.de>
* remove unecassary state
Signed-off-by: Timo K <toger5@hotmail.de>
* hotfix
Signed-off-by: Timo K <toger5@hotmail.de>
* remove video/audioAvailableAndEnabled
this is not required anymore since we disable the button.
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
by fixing the cause rather than the symptom: this upgrades the code to use the new, recommended JSX transform mode of React 17+, which no longer requires you to import React manually just to write JSX.
This version is not supposed to properly work, this is a work in
progress.
Main changes:
* Completely removed the PTT logic (for simplicity, it could be
introduced later).
* Abstracted away the work with the media devices.
* Defined confined interfaces of the affected components so that they
only get the data that they need without importing Matris JS SDK or
LiveKit SDK, so that we can exchange their "backend" at any time.
* Started using JS/TS SDK from LiveKit as well as their React SDK to
define the state of the local media devices and local streams.
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).