Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Add audio/video controls to device request page #58

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wolfgang42
Copy link

@wolfgang42 wolfgang42 commented Dec 5, 2022

So you can turn off your audio/video before joining, to avoid e.g. giving everyone horrible background noise.

WIP, known issues:

  • Right now the controls are just plunked in the form. I tried briefly to move them next to the dropdowns, but ran into CSS issues and gave up for the night.
  • I haven’t tested this, but I suspect if you switch to a different device things will get confused and the local state will go out of sync with the underlying stream device.

I had to do some refactoring; the commit messages should explain what’s going on.

@wolfgang42 wolfgang42 force-pushed the wolfgang42/device-request-controls branch from 314e3bb to e9f71a7 Compare December 5, 2022 06:59
@wolfgang42
Copy link
Author

Yeah, I confirmed that changing the device causes the stream state to go out of sync with the values in the Local atom. But I’m having trouble figuring out what the right fix for this is; it seems like right now the stream setup code is a bit scattered. I’m not very familiar with Recoil, so this might be a naïve question, but: is there a reason there isn’t a “LocalStream” atom that has {audioDeviceId, videoDeviceId, audioEnabled, videoEnabled} plus an effect to convert that into the appropriate calls to lib/mesh/stream.ts?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant