startCamera seems to always pick the default camera for me, regardless of what I pass into it. I am calling it as follows; the same object being passed into mediaDevices.getUserMedia
definitely changes.
let videoConstraints = {
deviceId: { exact: videoDevice.deviceId }
};
if (deepAR) {
await deepAR.stopCamera();
await deepAR.startCamera(true, {
audio: { deviceId: { exact: audioDevice.deviceId } },
video: videoConstraints
});
} else {
const stream = await navigator.mediaDevices.getUserMedia({
audio: { deviceId: { exact: audioDevice.deviceId } },
video: videoConstraints
});
videoControl.srcObject = stream;
videoControl.play();
}
Any help is greatly appreciated!