Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
1146 Discussions

deviceId member variable not working in Ics.Base.VideoTrackConstraints

New Contributor I


                 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 instanceof String && ( =

The instanceof String condition not satisfy so the result 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 && ( =  ( 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,


0 Kudos
1 Reply

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

0 Kudos