Open wolfgang42 opened 1 year ago
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
?
So you can turn off your audio/video before joining, to avoid e.g. giving everyone horrible background noise.
WIP, known issues:
I had to do some refactoring; the commit messages should explain what’s going on.