# startCamera with mediaStreamConstraints

**URL:** <https://forum.deepar.ai/t/startcamera-with-mediastreamconstraints/258>\
**Category:** SDK\
**Created:** [April 16, 2023, 6:37pm UTC](https://forum.deepar.ai/t/startcamera-with-mediastreamconstraints/258 "2023-04-16T18:37:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Randy\_Chapman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/randy_chapman/32/387_2.png) [@Randy\_Chapman](https://forum.deepar.ai/u/Randy_Chapman)\
**Post date:** [April 16, 2023, 6:37pm UTC](https://forum.deepar.ai/t/startcamera-with-mediastreamconstraints/258/1 "2023-04-16T18:37:55Z")

</div>

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.

```auto
        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!
