Class: Conference

Conference()

A conference is a virtual space with a unique URI where participants can communicate to each other in real-time using audio, video and text. Mind Web SDK uses Conference class to represent the conference from the point of view of the local participant, that's why to get a Conference object you should complete joining on behalf of one of the participants (i.e. using a token of one of them). Among other things the Conference object gives you an access to local and remote participants and conference media stream:

let conferenceURI = "https://api.mind.com/<APPLICATION_ID>/<CONFERENCE_ID>";
let participantToken = "<PARTICIPANT_TOKEN>";
let conferenceListener = new MindSDK.ConferenceListener();
MindSDK.join(conferenceURI, participantToken, conferenceListener).then(function(conference) {
    let video = document.getElementById("video");
    let conferenceStream = conference.getMediaStream();
    video.mediaStream = conferenceStream;
});

Constructor

new Conference()

Deprecated:

Classes

Conference

Methods

exit()

Deprecated:

getId() → {String}

Returns the ID of the conference. The ID is unique and never changes.

Returns:

The ID of the conference.

Type
String

getMe() → {Me}

Returns local participant on behalf of whom we are currently taking part in the Conference.

Returns:

The local participant on behalf of whom we are currently taking part in the Conference.

Type
Me

getMediaStream() → {MediaStream}

This method returns media stream of the conference. The returned stream is a mix of all audios and videos (excluding an audio of the local participant) that participants are at the moment streaming to the conference. The videos in the media stream are arranged using current layout of the local participant. The returned stream can be played with a help of <video/> or <audio/> HTML elements (just assign the stream to mediaStream property of the element). The stream is available at any time.

Returns:

The media steam of the conference.

Type
MediaStream

getMessages()

Deprecated:
  • Persistent message are deprecated, so that this method will be removed soon.

getName() → {String}

Returns the current name of the conference.

Returns:

The current name of the conference

Type
String

getNetworkQuality() → {Number}

Returns current network quality as mean opinion score. in range from 0 to 5, where 0 means no network connection at all and 5 means excellent network.

Returns:

The estimated quality of the network as a number in range from 0 to 5.

Type
Number

getParticipantById() → {Participant|null}

Returns remote participant with the given ID or null, if remote participant with the given ID wasn't found.

Returns:

The remote participant or null if it wasn't found

Type
Participant | null

getParticipants() → {Array.<Participant>}

Returns the list of all remote participants.

Returns:

The list of remote participants

Type
Array.<Participant>

getRecordingURL()

Returns personalized URL for downloading recording file. Any participant can get the URL, but only the one who plays a role of MODERATOR or an application who has created the conference can actually used it for downloading the recording file.

isRecording() → {Boolean}

Checks whether the conference is at the moment being recorded or not.

Returns:

The boolean value which indicates if the conference is at the moment being recorded or not

Type
Boolean

join()

Deprecated:

sendMessage()

Deprecated:

setName(name) → {Promise}

Changes the name of the conference. Only a MODERATOR can change the name of the conference. This is an asynchronous operation, that's why this method returns a Promise that resolves when the name changing is completed.

Parameters:
Name Type Description
name String

The new name for the conference

Returns:

The promise that resolves when the renaming is completed

Type
Promise

startRecording() → {Promise}

Starts recording of the conference into a media file on the server. Only a participant who plays a role of MODERATOR or an application who has created the conference can start the recording. The method is asynchronous and returns a Promise that resolves when operation is completed.

Returns:

The promise that resolves when the operation is completed

Type
Promise

stopRecording() → {Promise}

Stops recording of the conference into a media file on the server. Only a participant who plays a role of MODERATOR or an application who has created the conference can stop the recording. The method is asynchronous and returns a Promise that resolves when operation is completed.

Returns:

The promise that resolves when the operation is completed

Type
Promise