RTCMultiConnection Docs

RTCMultiConnection.extra "object"

HOME © Muaz Khan . @WebRTCWeb . Github . Latest issues . What's New?

RTCMultiConnection.extra object allows you share extra information among all participants. E.g. you can share user full-name, email, phone-numbers, profile photos or whatever. All participants in the meeting will get extra information.

How to set extra information?

connection.extra = {
  username: 'muazkh',
  fullname: 'Muaz Khan',
  email: 'muazkh@gmail.com',
  boolean: true,
  integer: 123,
  objects: {},
  whatever: 'whatever'
};
You can set above object anywhere, anytime. However please make sure to call updateExtraData if you are modifying above object in a LIVE session.
connection.extra.modifiedValue = 'new value';
connection.updateExtraData(); // this method requires v3 or newer release

Read extra information along with video

connection.onstream = function(event) {
  var extraInformation = event.extra;
  alert(extraInformation.fullName);
};

Read extra information along with chat messages

connection.onmessage = function(event) {
  var extraInformation = event.extra;
  alert(extraInformation.fullName);
};

Read extra information along with files

connection.onFileStart = function(file) {};
connection.onFileProgress = function(fileChunk) {};

connection.onFileEnd = function(file) {
  var extraInformation = file.extra;
  alert(extraInformation.fullName);
};

Listen for event as soon as someone updates his extra information

connection.onExtraDataUpdated = function(event) {
  var extraInformation = event.extra;
  alert(extraInformation.fullName);
};

Latest Issues

Want to ask a Question?

You can include your email for private conversation!

Latest Updates