RTCMultiConnection Docs

RTCMultiConnection API Reference / "session" object

"session" object provides single place to set multiple media-sessions and directions. You can open single or multiple media-sessions, simply setting a few booleans!
connection.session = {
     audio:     true, // by default, it is true
     video:     true, // by default, it is true
     screen:    false,
     
     data:      false,
     
     oneway:    false,
     broadcast: false,
     
     inactive: true  // added since v2.0.*
};

v2.0.* updates:

// Added support for initial "inactive" sessions.
// You can setup audio/video connection however streams will be "inactive":
// streams are on-hold:
connection.session = {
    inactive: true,
    audio:    true,
    video:    true
};

// to unhold streams later
connection.unhold('both'); // both audio and video

You can even use empty object!

connection.session = {};

It will cause initiator to become recvonly.

Want to setup video conference?

connection.session = {
     audio:  true,
     video:  true
};

Want to setup audio conference?

connection.session = {
     video:  true
};

Want to setup audio+screen conference?

connection.session = {
     audio:  true,
     screen:  true
};

Want to share screen in one-way direction?

connection.session = {
     screen:  true,
     oneway:  true
};

Want to setup data-only connection?

connection.session = {
     data:  true
};

Want to setup video conference + data connection?

connection.session = {
     audio:  true,
     video:  true,
     data:   true
};


Want to ask a Question?

You can include your email for private conversation!

Latest Updates