This PR focuses on removing the mediaDevicesInitialState prop from the StreamCall component to control the initial state of the camera and mic.
Instead, to voluntarily apply the mute status on the camera and mic, you can simply call call.camera.enable()/call.camera.disable() for the camera and call.microphone.enable()/call.microphone.disable() for the mic.
Eg:
initialAudioMuted={true} would change as call.microphone.disable();
initialCameraMuted={false) would change as call.camera.enable()
You can also apply the functions mentioned above on top of our backend settings. We apply our backend settings through the hook useApplyDefaultMediaStreamSettings, which you can override if you have a custom use case or use directly if you just want the default backend settings to be respected.
This PR focuses on removing the
mediaDevicesInitialState
prop from theStreamCall
component to control the initial state of the camera and mic.Instead, to voluntarily apply the mute status on the camera and mic, you can simply call
call.camera.enable()/call.camera.disable()
for the camera andcall.microphone.enable()/call.microphone.disable()
for the mic.Eg:
You can also apply the functions mentioned above on top of our backend settings. We apply our backend settings through the hook
useApplyDefaultMediaStreamSettings,
which you can override if you have a custom use case or use directly if you just want the default backend settings to be respected.This PR fixes the issue pointed out in #1236 as well.