RTCMultiConnection icon indicating copy to clipboard operation
RTCMultiConnection copied to clipboard

How can i change microphone and camera by rtcmulticonnection ?

Open chieuduong-bocasay opened this issue 5 years ago • 4 comments
trafficstars

Hi admin,

I'm using rtcmulticonnection make a video conference. I need change device (microphone or camera) i want on room. But i check all methods you support and no see which methods support change devices of computer like microphone or camera. So, can you help me know what's method support or how can do that together with rtcmulticonnection.

Thank you very much Chieu Duong

chieuduong-bocasay avatar Nov 26 '19 09:11 chieuduong-bocasay

For better understanding:

  • Do you want to change the Camera during live-stream?

-> Iterate through devices, save the device ID and send a custom message through socket to access the device via getusermedia and the device id

If you want to do that with your own camera, forget the step with the socket and just access the device via deviceid.

Patrick-Vogt avatar Nov 26 '19 10:11 Patrick-Vogt

For better understanding:

  • Do you want to change the Camera during live-stream?

-> Iterate through devices, save the device ID and send a custom message through socket to access the device via getusermedia and the device id

If you want to do that with your own camera, forget the step with the socket and just access the device via deviceid.

hi @Patrick-Vogt ,

i want change microphone or camera when i live-stream. i had research try like below :

const updateConfigRtcDevice = (rtcmulticonnection, microphoneId, cameraId) => {
  rtcmulticonnection.mediaConstraints = {
    audio: {
      mandatory: {},
      optional: [
        {
          sourceId: microphoneId //'your-microphone-id'
        }
      ]
    },
    video: {
      mandatory: {},
      optional: [
        {
          sourceId: cameraId //'your-camera-id'
        }
      ]
    }
  };

  if (rtcmulticonnection.DetectRTC.browser.name === 'Firefox') {
    rtcmulticonnection.mediaConstraints = {
      audio: {
        deviceId: microphoneId //'your-microphone-id'
      },
      video: {
        deviceId: cameraId //'your-camera-id'
      }
    };
  }
};

but doesn't work. :(

chieuduong-bocasay avatar Nov 26 '19 10:11 chieuduong-bocasay

Any advances?

Careprod-Technologies avatar Aug 04 '21 14:08 Careprod-Technologies

any update on this issue. ?

anilnagar19 avatar Jul 12 '22 05:07 anilnagar19