RTCMultiConnection Docs

RTCMultiConnection API Reference / "dontAttachStream" boolean

In simple words: "Force to skip media streams attachment".

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

It is also useful in scenarios where you want to provide join-with or without media.

dontAttachStream

// 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;

dontCaptureUserMedia

// ask RTCMultiConnection to don't auto-capture any media
// added since v1.9
connection.dontCaptureUserMedia = 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