RTCMultiConnection Docs

RTCMultiConnection API Reference / "dontCaptureUserMedia" boolean

In simple words: "Force to skip media capturing".

"dontCaptureUserMedia" boolean can be used to ask RTCMultiConnection don't capture any user media. Remember, it NEVER asks RTCMultiConnection to don't-attach-stream. Attachment of stream can be prevented using dontAttachStream boolean.

It is useful in scenarios where you want to add/use external media streams.

For example, you may want to manually capture 4-screen capturing streams using captureUserMedia method; in this case, you need to set dontCaptureUserMedia boolean before calling open or join method.


// ask RTCMultiConnection to don't auto-capture any media
// added since v1.9
connection.dontCaptureUserMedia = true;


// ask RTCMultiConnection to don't attach any stream to peer connection
// it means that RTCMultiConnection will NEVER use "peer.addStream"
// for any local media stream. So you'll be joining with no stream.
// Remember, v1.8 and earlier versions prevents capturing of user media for this boolean
connection.dontAttachStream = true;

Difference between dontCaptureUserMedia and dontAttachStream

  1. dontCaptureUserMedia merely prevents RTCMultiConnection to capture any user media.
  2. dontAttachStream NEVER prevents RTCMultiConnection to capture any user media. It simply asks RTCMultiConnection to NEVER attach stream to peer connection. So, peer.addStream method will NEVER be invoked.

Want to ask a Question?

You can include your email for private conversation!

Latest Updates