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

Camera switch in web

Nikhil_kumar__Doosar
243 Views

Hello Team,

We have issue with camera switch for web.

We are using intel v4.1.1 framework, we have more than one camera and mic inputs while ongoing call how we can switch cameras. 

By WebRTC framework, we can manage through SDP and create offer onfly, how we can achieve this functionality using intel framework.

 In Android SDK contains switch camera function, coming to web we cannot find any alternative.

 

Thanks ,

Nikhil.

0 Kudos
6 Replies
Zhenqi_C_Intel
Employee
243 Views

For webCameras, they have different devices ID and  there is no API to switch them in JS SDK. You can only specify device ID when calling MediaStreamFactory.createMediaStream method.

Nikhil_kumar__Doosar
243 Views

Hi Zhenqi,

We tried this but when we create media stream using new device id we got the stream, but it can not reflecting on the remote participant side , how we can achieve this without republishing.

Thanks,

Nikhil  

Qiujiao_W_Intel
Employee
243 Views

As zhenqi mentioned, in js web sdk, you cannot dynamically switch camera without republishing. We provides the API to list devices and choose one device in create media stream, and if you publish the stream then the stream content is fixed.

Nikhil_kumar__Doosar
243 Views

Hello Qiujiao,

Good morning and thanks for your reply. If we understand correctly, we no need to republish the stream in Android platform (We haven't noticed like this in Android). But, we must republish the stream in Web and iOS platforms. We just want to confirm whether we are going in right direction or not. Please confirm.

Thank you.

Best Regards,
Nikhil.

Jianjun_Z_Intel
Employee
243 Views

Hi,

https://w3c.github.io/webrtc-pc/#dom-rtcrtpsender-replacetrack is likely to be the one you need on web platform. But it is not exposed in ICS SDK. You may need to modify the source code. On iOS platform, ICSLocalStream can be constructed with an RTCMediaStream. Please create a RTCMediaStream with a RTCVideoCapturer controlled by you. Then you will be able to control the RTCVideoCapturer object includes switching  camera.

Nikhil_kumar__Doosar
243 Views

Hello Jianjun,

Good morning and thanks for your reply.

Thanks, 

Nikhil

Reply