# Licode with external camera

**URL:** <https://discourse.lynckia.com/t/licode-with-external-camera/742>\
**Category:** Support\
**Created:** [March 12, 2018, 6:30pm UTC](https://discourse.lynckia.com/t/licode-with-external-camera/742 "2018-03-12T18:30:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![EVILWORS666](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@EVILWORS666](https://discourse.lynckia.com/u/EVILWORS666)\
**Post date:** [March 12, 2018, 6:30pm UTC](https://discourse.lynckia.com/t/licode-with-external-camera/742/1 "2018-03-12T18:30:42Z")

</div>

Hello,  
I have a question, I’m working with Licode and crosswalk webview. I was wondering if I can choose the camera that the videoconference will operate because I have a webcam and I would like to use this and don’t use my laptop camera. I have searched on internet, but I didn’t find how to use an external camera for this reason I ask you Is possible to use an external data?

---

<div class="post-metadata">

**Author:** ![mkh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/mkh/32/38_2.png) [@mkh](https://discourse.lynckia.com/u/mkh)\
**Post date:** [March 13, 2018, 3:19am UTC](https://discourse.lynckia.com/t/licode-with-external-camera/742/2 "2018-03-13T03:19:51Z")

</div>

First you need to fetch list of available devices: [https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices)

Then you can set the device ID in your video constraint like this:

```auto
const config = {
  audio: true,
  video: {
    deviceId: { exact: [videoDeviceId] },
  },
}

```

---

<div class="post-metadata">

**Author:** ![EVILWORS666](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@EVILWORS666](https://discourse.lynckia.com/u/EVILWORS666)\
**Post date:** [March 14, 2018, 5:35am UTC](https://discourse.lynckia.com/t/licode-with-external-camera/742/3 "2018-03-14T05:35:39Z")

</div>

Thanks for your answer @mkh  
I have tried what you mention but I get an error when  
I trying to connect to the room.

 ![console%20client](https://canada1.discourse-cdn.com/flex031/uploads/lynckia/original/1X/9f3a10689f0a9f6b131b5298eae1f5f253cb5485.png)

This is my configuration:

 ![server](https://canada1.discourse-cdn.com/flex031/uploads/lynckia/original/1X/56fa215d026758378bac11c6e1a4f53ef287360b.png)

---

<div class="post-metadata">

**Author:** ![mkh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/mkh/32/38_2.png) [@mkh](https://discourse.lynckia.com/u/mkh)\
**Post date:** [March 14, 2018, 7:53pm UTC](https://discourse.lynckia.com/t/licode-with-external-camera/742/4 "2018-03-14T19:53:11Z")

</div>

Try without `[]`:  
`{ exact: "device_id" }`

---

<div class="post-metadata">

**Author:** ![EVILWORS666](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@EVILWORS666](https://discourse.lynckia.com/u/EVILWORS666)\
**Post date:** [March 14, 2018, 10:27pm UTC](https://discourse.lynckia.com/t/licode-with-external-camera/742/5 "2018-03-14T22:27:17Z")

</div>

I get the same error as before:

 ![](https://canada1.discourse-cdn.com/flex031/uploads/lynckia/original/1X/2019208be83589959c0af028d29205bbbdab3e86.png)

---

<div class="post-metadata">

**Author:** ![mkh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/mkh/32/38_2.png) [@mkh](https://discourse.lynckia.com/u/mkh)\
**Post date:** [March 15, 2018, 3:15am UTC](https://discourse.lynckia.com/t/licode-with-external-camera/742/6 "2018-03-15T03:15:47Z")

</div>

But it works for me:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/lynckia/original/1X/0f900da4a8a1f92d3e86c1bc9479ad22a04bb59e.png)

Please don’t set extra properties (e.g. videoSize, videoFrameRate, etc) and see if it works. Or maybe the device ID is wrong.

---

<div class="post-metadata">

**Author:** ![EVILWORS666](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@EVILWORS666](https://discourse.lynckia.com/u/EVILWORS666)\
**Post date:** [March 16, 2018, 3:53pm UTC](https://discourse.lynckia.com/t/licode-with-external-camera/742/7 "2018-03-16T15:53:56Z")

</div>

I tried without putting the properties you mentioned, but I still can not connect.  
I asked and they told me that this feature of the deviceId is not typical of Licode, but rather of an implementation of getUserMedia ()

Did you do something to make it work for you with your version of Licode?

---

<div class="post-metadata">

**Author:** ![mkh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/mkh/32/38_2.png) [@mkh](https://discourse.lynckia.com/u/mkh)\
**Post date:** [March 18, 2018, 8:11am UTC](https://discourse.lynckia.com/t/licode-with-external-camera/742/8 "2018-03-18T08:11:51Z")

</div>

I am exactly on commit `dfb674e4f92414b2c2c7aceaffc69350c0b83c2f` (Update AdapterJS to version 5.0.6) without any modifications. And yes the `deviceId` is a getUserMedia() specification but also is supported by Licode.
