Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Contributor I
7 Views

deviceId member variable not working in Ics.Base.VideoTrackConstraints

Hi,

                 If we give deviceId of a camera source then the camera never switch. i have configure device id using the following

let videoConstraintsForCamera = new Ics.Base.VideoTrackConstraints(Ics.Base.VideoSourceInfo.CAMERA);

videoConstraintsForCamera.deviceId = '4535529bf3d84145da39f3d64ce9e95bc5ce786d4ca26f2ffba91267d2c6c916';

but it never switch the camera

I have find out the issue

in ics.js(library file) the following condition never satisfy 

e.video.deviceId instanceof String && (n.video.deviceId = e.video.deviceId)

The instanceof String condition not satisfy so the result n.video.deviceId remains null;

2)Again i changed the code like this

videoConstraintsForCamera.deviceId = new String('4535529bf3d84145da39f3d64ce9e95bc5ce786d4ca26f2ffba91267d2c6c916');

this time the instanceof String condition satisfy but the camera not switched because navigator.mediaDevices.getUserMedia(n) never taking the string object version of deviceId

3)Again i just edited the sdk like the following

true && (n.video.deviceId = e.video.deviceId)  ( instanceof String condition replaced to true - always pass)

and pass deviceId like this videoConstraintsForCamera.deviceId = '4535529bf3d84145da39f3d64ce9e95bc5ce786d4ca26f2ffba91267d2c6c916';

Now i can successfully switch the camera using device id,  But it is not a proper way to edit sdk. please suggest me most reliable option 

intel webrtc version : 4.0

server :  centos 7

browser : google chrome latest version

client side app : javascript and html ( no frameworks )

Thank you,

 

Webrtc Nodejs engineer +919809888818 skype: nithinj2e
Tags (2)
0 Kudos
1 Reply
Highlighted
7 Views

Thanks Nithin for reporting

Thanks Nithin for reporting this issue, we are working on it and will get back to you when it's fixed

0 Kudos