strong-kite-90563
05/20/2023, 5:56 PMsetActiveMediaDevice
from useMediaDeviceSelect
hook of component-react (calling it inside LiveKitRoom
context). I am calling it before connecting to room (sort of like choosing the camera device in pre-join stage, and I want the selected device to be the published device when I click connect):
const {
devices: videoDevices,
activeDeviceId,
setActiveMediaDevice,
} = useMediaDeviceSelect({
kind: "videoinput",
});
I am getting this error (when setActiveMediaDevice
):
Failed to select the desired device. Desired: e7f7638c0538deb435cc2600e4f4ca1378c1b8e8550c2496912cfe5e3f370c4e. Actual: undefinedOr in general how do I initialize the deviceId using a selected device before connecting to room?