See comments. I'm not very happy with how this code bounces state in and out of different hooks and useEffect blocks, but as a quick fix this should work.
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.
This was causing an extra reconnect cycle when the call was first
joined because it thought the previous SFU config was valid. This was
probably causing some client to fail to connect at all.
By avoiding a method call that was accidentally causing LiveKit to try to publish tracks before the SFU connection was established, resulting in an unclosed stream.
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.
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.
* Change `jwt_service_url` to `livekit_service_url`
* Make it a POST so we can send the openID token sensibly
* Get an OIDC token & pass it with the request
* Read the SFU URL from there too
and convert the auth server accordingly, althugh with no actual OIDC
support yet, it just issues tokens blindly just as before and ignores
the openid token completely.
We'll need to update configs & the JWT service before merging this.
* respect mute state set in lobby for call
Signed-off-by: Timo K <toger5@hotmail.de>
* move device from lobby to call
Signed-off-by: Timo K <toger5@hotmail.de>
* save device in local storage
Signed-off-by: Timo K <toger5@hotmail.de>
* local storage + fixes
Signed-off-by: Timo K <toger5@hotmail.de>
* device permissions
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>