Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement WebRTC controls as a hook
This replaces the hierarchy of components that managed our WebRTC interactions with a new `useCallState` hook which encapsulates all of the call state management functionality. This provides a key benefit: we can hoist the actual state storage higher in the component tree, which means that we won't lose call state when switching layouts between desktop and mobile screen widths. As a bonus, this change also corrects a bunch of things from the audio calls implementation that would have gone awry under `StrictMode` in React 18 due to doing side-effectful actions outside of `useEffect` blocks. Fixes #594.
- Loading branch information