Class: Me

Me

Participant is a human being which is taking part in the conference and communicating with other participants using either an application based on Mind Web/Android/iOS SDK or SIP-enabled software/hardware. A participant on behalf of whom application is interacting with Mind Web SDK is called local, whereas all other participants are considered to be remote (but each of them is local from its point of view).

Me class used for representing local participant. Actually Me is a subclass of Participant class, so that it inherits all public methods of the superclass and adds methods for setting primary and secondary media streams to be streamed on behalf of the participant:

let me = conference.getMe();

navigator.mediaDevices.getUserMedia({ video: true, audio: true }).then(function(stream) {
    me.setMediaStream(stream);
});

navigator.mediaDevices.getDisplayMedia({ video: true }).then(function(stream) {
    me.setSecondaryMediaStream(stream);
});

Classes

Me

Methods

setMediaStream(stream)

Sets primary MediaStream for streaming on behalf of the participant. The primary media stream is intended for streaming video and voice taken from camera and microphone, respectively, which participant is using at the moment. If primary media stream is already set, then it will replaced with the passed one. Setting null stops streaming.

Parameters:
Name Type Description
stream MediaStream

The primary media stream for streaming on behalf of the participant.

setSecondaryMediaStream(stream)

Sets secondary MediaStream for streaming on behalf of the participant. The secondary media stream is intended for streaming an arbitrary audio/video content (e.g. for sharing a screen or window). If secondary MediaStream is already set, then it will replaced with the passed one. Setting null stops streaming.

Parameters:
Name Type Description
stream MediaStream

The secondary media strem for streaming on behalf of the participant.