Licode with external camera


#1

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?


#2

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

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

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

#3

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

This is my configuration:


#4

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


#5

I get the same error as before:


#6

But it works for me:

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


#7

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?


#8

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.