Select input audio/video device


#1

It seems Erizo.Stream does not support deviceId in v4, right? Then I can send a PR for that if it is okay.


#2

You can do it already:

let cameraId = '';
let micId = '';
let properties = {
  video: {
    deviceId: {exact: [cameraId]},
  },
  audio: {
    deviceId: {exact: [micId]},
  },
};
let publisher = Erizo.Stream(properties);

We’re using a similar example in production and it works.


#3

Yes it works!
Thank you.


#4

The problem is that you can not use it in combination with videoSize or videoFrameRate and browser ignores them.


#5

Here’s the solution:

properties.video = {
  deviceId: { exact: [cameraId] },
  width: { min: 320, max: 640 },
  height: { min: 240, max: 480 },
  frameRate: { min: 15, max: 25 },
}