Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
1136 Discussions

deviceId member variable not working in Ics.Base.VideoTrackConstraints

Nithin_P_
New Contributor I
110 Views

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,

 

0 Kudos
1 Reply
Qiujiao_W_Intel
Employee
110 Views

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

Reply