2017-01-30 09:49:05 +00:00
# Jitsi Meet API
2017-01-26 01:14:30 +00:00
2019-02-23 16:39:27 +00:00
You can use the Jitsi Meet API to embed Jitsi Meet in to your application. You are also welcome to use it for embedding the globally distributed and highly available deployment on meet.jit.si itself. The only thing we ask for in that case is that you please DO NOT remove the jitsi.org logo from the top left corner.
2017-01-26 01:14:30 +00:00
2017-01-30 09:49:05 +00:00
## Installation
To embed Jitsi Meet in your application you need to add the Jitsi Meet API library:
2017-01-26 01:14:30 +00:00
```javascript
2019-03-29 14:15:53 +00:00
< script src = 'https://meet.jit.si/external_api.js' > < / script >
2017-01-26 01:14:30 +00:00
```
2017-03-07 09:39:51 +00:00
## API
2017-07-13 19:23:54 +00:00
### `api = new JitsiMeetExternalAPI(domain, options)`
2017-03-07 09:39:51 +00:00
The next step for embedding Jitsi Meet is to create the Jitsi Meet API object.
Its constructor gets a number of options:
2019-03-29 14:15:53 +00:00
* **domain**: domain used to build the conference URL, 'meet.jit.si' for
2017-03-07 09:39:51 +00:00
example.
2017-07-13 19:23:54 +00:00
* **options**: object with properties - the optional arguments:
2017-08-01 05:48:50 +00:00
* **roomName**: (optional) name of the room to join.
2017-07-13 20:24:44 +00:00
* **width**: (optional) width for the iframe which will be created. If a number is specified it's treated as pixel units. If a string is specified the format is number followed by 'px', 'em', 'pt' or '%'.
* **height**: (optional) height for the iframe which will be created. If a number is specified it's treated as pixel units. If a string is specified the format is number followed by 'px', 'em', 'pt' or '%'.
2017-08-01 05:48:50 +00:00
* **parentNode**: (optional) HTML DOM Element where the iframe will be added as a child.
* **configOverwrite**: (optional) JS object with overrides for options defined in [config.js].
2017-07-13 19:23:54 +00:00
* **interfaceConfigOverwrite**: (optional) JS object with overrides for options defined in [interface_config.js].
2017-08-04 08:15:11 +00:00
* **noSSL**: (optional, defaults to true) Boolean indicating if the server should be contacted using HTTP or HTTPS.
2017-07-13 19:23:54 +00:00
* **jwt**: (optional) [JWT ](https://jwt.io/ ) token.
2018-01-22 23:47:18 +00:00
* **onload**: (optional) handler for the iframe onload event.
2018-04-30 12:08:11 +00:00
* **invitees**: (optional) Array of objects containing information about new participants that will be invited in the call.
2019-03-25 11:33:41 +00:00
* **devices**: (optional) A map containing information about the initial devices that will be used in the call.
2017-03-07 09:39:51 +00:00
Example:
2017-01-30 09:49:05 +00:00
2017-01-26 01:14:30 +00:00
```javascript
2019-03-29 14:15:53 +00:00
const domain = 'meet.jit.si';
const options = {
roomName: 'JitsiMeetAPIExample',
2017-07-13 19:23:54 +00:00
width: 700,
height: 700,
2017-08-01 05:48:50 +00:00
parentNode: document.querySelector('#meet')
2019-03-29 14:15:53 +00:00
};
const api = new JitsiMeetExternalAPI(domain, options);
2017-01-26 01:14:30 +00:00
```
2019-03-25 11:33:41 +00:00
You can set the initial media devices for the call:
```javascript
2019-03-29 14:15:53 +00:00
const domain = 'meet.jit.si';
const options = {
2019-03-25 11:33:41 +00:00
...
devices: {
2019-03-29 14:15:53 +00:00
audioInput: '< deviceLabel > ',
audioOutput: '< deviceLabel > ',
videoInput: '< deviceLabel > '
},
...
};
const api = new JitsiMeetExternalAPI(domain, options);
2019-03-25 11:33:41 +00:00
```
2017-03-07 09:39:51 +00:00
You can overwrite options set in [config.js] and [interface_config.js].
2017-04-10 17:59:44 +00:00
For example, to enable the filmstrip-only interface mode, you can use:
2017-01-30 09:49:05 +00:00
2017-01-26 01:14:30 +00:00
```javascript
2019-03-29 14:15:53 +00:00
const options = {
...
interfaceConfigOverwrite: { filmStripOnly: true },
...
2017-07-13 19:23:54 +00:00
};
2019-03-29 14:15:53 +00:00
const api = new JitsiMeetExternalAPI(domain, options);
2017-01-26 01:14:30 +00:00
```
2017-03-07 09:39:51 +00:00
You can also pass a jwt token to Jitsi Meet:
2017-03-20 18:39:16 +00:00
```javascript
2019-03-29 14:15:53 +00:00
const options = {
...
jwt: '< jwt_token > ',
noSsl: false,
...
2017-07-13 19:23:54 +00:00
};
2019-03-29 14:15:53 +00:00
const api = new JitsiMeetExternalAPI(domain, options);
2017-03-20 18:39:16 +00:00
```
2017-03-07 09:39:51 +00:00
### Controlling the embedded Jitsi Meet Conference
2017-01-26 01:14:30 +00:00
2019-03-28 16:29:30 +00:00
Device management `JitsiMeetExternalAPI` methods:
2019-03-21 12:33:40 +00:00
* **getAvailableDevices** - Retrieve a list of available devices.
```javascript
2019-03-29 14:15:53 +00:00
api.getAvailableDevices().then(devices => {
2019-03-21 12:33:40 +00:00
// devices = {
2019-03-29 14:15:53 +00:00
// audioInput: [{
// deviceId: 'ID'
// groupId: 'grpID'
// kind: 'audioinput'
// label: 'label'
2019-03-21 12:33:40 +00:00
// },....],
2019-03-29 14:15:53 +00:00
// audioOutput: [{
// deviceId: 'ID'
// groupId: 'grpID'
// kind: 'audioOutput'
// label: 'label'
2019-03-21 12:33:40 +00:00
// },....],
2019-03-29 14:15:53 +00:00
// videoInput: [{
// deviceId: 'ID'
// groupId: 'grpID'
// kind: 'videoInput'
// label: 'label'
2019-03-21 12:33:40 +00:00
// },....]
// }
...
});
```
2019-03-27 17:30:56 +00:00
* **getCurrentDevices** - Retrieve a list with the devices that are currently selected.
2019-03-21 12:33:40 +00:00
```javascript
2019-03-29 14:15:53 +00:00
api.getCurrentDevices().then(devices => {
2019-03-21 12:33:40 +00:00
// devices = {
2019-03-29 14:15:53 +00:00
// audioInput: {
// deviceId: 'ID'
// groupId: 'grpID'
// kind: 'videoInput'
// label: 'label'
2019-03-28 13:08:00 +00:00
// },
2019-03-29 14:15:53 +00:00
// audioOutput: {
// deviceId: 'ID'
// groupId: 'grpID'
// kind: 'videoInput'
// label: 'label'
2019-03-28 13:08:00 +00:00
// },
2019-03-29 14:15:53 +00:00
// videoInput: {
// deviceId: 'ID'
// groupId: 'grpID'
// kind: 'videoInput'
// label: 'label'
2019-03-28 13:08:00 +00:00
// }
2019-03-21 12:33:40 +00:00
// }
...
});
```
* **isDeviceChangeAvailable** - Resolves with true if the device change is available and with false if not.
```javascript
// The accepted deviceType values are - 'output', 'input' or undefined.
2019-03-29 14:15:53 +00:00
api.isDeviceChangeAvailable(deviceType).then(isDeviceChangeAvailable => {
2019-03-21 12:33:40 +00:00
...
});
```
* **isDeviceListAvailable** - Resolves with true if the device list is available and with false if not.
```javascript
2019-03-29 14:15:53 +00:00
api.isDeviceListAvailable().then(isDeviceListAvailable => {
2019-03-21 12:33:40 +00:00
...
});
```
2019-03-28 16:29:30 +00:00
* **isMultipleAudioInputSupported** - Resolves with true if multiple audio input is supported and with false if not.
2019-03-21 12:33:40 +00:00
```javascript
2019-03-29 14:15:53 +00:00
api.isMultipleAudioInputSupported().then(isMultipleAudioInputSupported => {
2019-03-21 12:33:40 +00:00
...
});
```
2019-03-28 13:08:00 +00:00
* **setAudioInputDevice** - Sets the audio input device to the one with the label or id that is passed.
2019-03-21 12:33:40 +00:00
```javascript
2019-03-28 13:08:00 +00:00
api.setAudioInputDevice(deviceLabel, deviceId);
2019-03-21 12:33:40 +00:00
```
2019-03-28 13:08:00 +00:00
* **setAudioOutputDevice** - Sets the audio output device to the one with the label or id that is passed.
2019-03-21 12:33:40 +00:00
```javascript
2019-03-28 13:08:00 +00:00
api.setAudioOutputDevice(deviceLabel, deviceId);
2019-03-21 12:33:40 +00:00
```
2019-03-28 13:08:00 +00:00
* **setVideoInputDevice** - Sets the video input device to the one with the label or id that is passed.
2019-03-21 12:33:40 +00:00
```javascript
2019-03-28 13:08:00 +00:00
api.setVideoInputDevice(deviceLabel, deviceId);
2019-03-21 12:33:40 +00:00
```
2017-01-30 09:49:05 +00:00
You can control the embedded Jitsi Meet conference using the `JitsiMeetExternalAPI` object by using `executeCommand` :
2017-01-26 01:14:30 +00:00
2017-01-30 09:49:05 +00:00
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommand(command, ...arguments);
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
The `command` parameter is String object with the name of the command. The following commands are currently supported:
2017-01-26 01:14:30 +00:00
2017-01-30 09:49:05 +00:00
* **displayName** - Sets the display name of the local participant. This command requires one argument - the new display name to be set.
```javascript
2017-01-26 01:14:30 +00:00
api.executeCommand('displayName', 'New Nickname');
```
2017-01-30 09:49:05 +00:00
2019-02-17 14:40:24 +00:00
* **subject** - Sets the subject of the conference. This command requires one argument - the new subject to be set.
```javascript
api.executeCommand('subject', 'New Conference Subject');
```
2017-01-30 09:49:05 +00:00
* **toggleAudio** - Mutes / unmutes the audio for the local participant. No arguments are required.
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommand('toggleAudio');
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
* **toggleVideo** - Mutes / unmutes the video for the local participant. No arguments are required.
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommand('toggleVideo');
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
2017-04-10 17:59:44 +00:00
* **toggleFilmStrip** - Hides / shows the filmstrip. No arguments are required.
2017-01-30 09:49:05 +00:00
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommand('toggleFilmStrip');
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
* **toggleChat** - Hides / shows the chat. No arguments are required.
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommand('toggleChat');
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
* **toggleShareScreen** - Starts / stops screen sharing. No arguments are required.
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommand('toggleShareScreen');
2017-01-26 01:14:30 +00:00
```
2019-05-18 20:40:58 +00:00
* **toggleTileView** - Enter / exit tile view layout mode. No arguments are required.
```javascript
api.executeCommand('toggleTileView');
```
2017-01-26 01:14:30 +00:00
* **hangup** - Hangups the call. No arguments are required.
2017-01-30 09:49:05 +00:00
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommand('hangup');
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
* **email** - Changes the local email address. This command requires one argument - the new email address to be set.
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommand('email', 'example@example.com');
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
* **avatarUrl** - Changes the local avatar URL. This command requires one argument - the new avatar URL to be set.
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommand('avatarUrl', 'https://avatars0.githubusercontent.com/u/3671647');
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
You can also execute multiple commands using the `executeCommands` method:
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommands(commands);
2017-01-26 01:14:30 +00:00
```
2017-03-31 16:38:44 +00:00
The `commands` parameter is an object with the names of the commands as keys and the arguments for the commands as values:
2017-01-30 09:49:05 +00:00
```javascript
2019-03-29 14:15:53 +00:00
api.executeCommands({
displayName: [ 'nickname' ],
toggleAudio: []
});
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
You can add event listeners to the embedded Jitsi Meet using the `addEventListener` method.
2017-04-03 15:48:46 +00:00
**NOTE: This method still exists but it is deprecated. JitsiMeetExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods (`addListener` or `on` ).**
2017-01-30 09:49:05 +00:00
```javascript
2019-03-29 14:15:53 +00:00
api.addEventListener(event, listener);
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
The `event` parameter is a String object with the name of the event.
The `listener` parameter is a Function object with one argument that will be notified when the event occurs with data related to the event.
2017-01-26 01:14:30 +00:00
2017-01-30 09:49:05 +00:00
The following events are currently supported:
2017-12-05 03:27:17 +00:00
* **avatarChanged** - event notifications about avatar
changes. The listener will receive an object with the following structure:
```javascript
{
2019-03-29 14:15:53 +00:00
id: string, // the id of the participant that changed his avatar.
avatarURL: string // the new avatar URL.
2017-12-05 03:27:17 +00:00
}
```
2017-01-30 09:49:05 +00:00
2017-08-04 08:15:11 +00:00
* **audioAvailabilityChanged** - event notifications about audio availability status changes. The listener will receive an object with the following structure:
```javascript
{
2019-03-29 14:15:53 +00:00
available: boolean // new available status - boolean
2017-08-04 08:15:11 +00:00
}
```
* **audioMuteStatusChanged** - event notifications about audio mute status changes. The listener will receive an object with the following structure:
```javascript
{
2019-03-29 14:15:53 +00:00
muted: boolean // new muted status - boolean
2017-08-04 08:15:11 +00:00
}
```
2018-01-30 13:43:06 +00:00
* **screenSharingStatusChanged** - receives event notifications about turning on/off the local user screen sharing. The listener will receive object with the following structure:
```javascript
{
2019-03-29 14:15:53 +00:00
on: boolean, //whether screen sharing is on
details: {
2019-03-07 05:46:17 +00:00
2019-03-29 14:15:53 +00:00
// From where the screen sharing is capturing, if known. Values which are
// passed include 'window', 'screen', 'proxy', 'device'. The value undefined
// will be passed if the source type is unknown or screen share is off.
sourceType: string|undefined
}
2018-01-30 13:43:06 +00:00
}
```
2019-05-18 20:40:58 +00:00
* **tileViewChanged** - event notifications about tile view layout mode being entered or exited. The listener will receive object with the following structure:
```javascript
{
enabled: boolean, // whether tile view is not displayed or not
}
```
2017-01-30 09:49:05 +00:00
* **incomingMessage** - Event notifications about incoming
messages. The listener will receive an object with the following structure:
```javascript
2017-01-26 01:14:30 +00:00
{
2019-03-29 14:15:53 +00:00
from: string, // The id of the user that sent the message
nick: string, // the nickname of the user that sent the message
message: string // the text of the message
2017-01-26 01:14:30 +00:00
}
```
2017-01-30 09:49:05 +00:00
* **outgoingMessage** - Event notifications about outgoing
messages. The listener will receive an object with the following structure:
```javascript
2017-01-26 01:14:30 +00:00
{
2019-03-29 14:15:53 +00:00
message: string // the text of the message
2017-01-26 01:14:30 +00:00
}
```
2017-01-30 09:49:05 +00:00
2018-05-01 15:13:18 +00:00
* **displayNameChange** - event notifications about display name
2017-01-30 09:49:05 +00:00
changes. The listener will receive an object with the following structure:
```javascript
2017-01-26 01:14:30 +00:00
{
2019-03-29 14:15:53 +00:00
id: string, // the id of the participant that changed his display name
displayname: string // the new display name
2017-01-26 01:14:30 +00:00
}
```
2017-01-30 09:49:05 +00:00
2019-03-28 12:21:38 +00:00
* **deviceListChanged** - event notifications about device list changes. The listener will receive an object with the following structure:
```javascript
{
2019-03-29 14:15:53 +00:00
devices: Object // the new list of available devices.
2019-03-28 12:21:38 +00:00
}
```
NOTE: The devices object has the same format as the getAvailableDevices result format.
2018-06-18 09:19:07 +00:00
* **emailChange** - event notifications about email
changes. The listener will receive an object with the following structure:
```javascript
{
2019-03-29 14:15:53 +00:00
id: string, // the id of the participant that changed his email
email: string // the new email
2018-06-18 09:19:07 +00:00
}
```
2019-03-11 18:17:28 +00:00
* **filmstripDisplayChanged** - event notifications about the visibility of the filmstrip being updated.
```javascript
{
2019-03-29 14:15:53 +00:00
visible: boolean // Whether or not the filmstrip is displayed or hidden.
2019-03-11 18:17:28 +00:00
}
```
2018-06-18 09:19:07 +00:00
2017-01-30 09:49:05 +00:00
* **participantJoined** - event notifications about new participants who join the room. The listener will receive an object with the following structure:
```javascript
2017-01-26 01:14:30 +00:00
{
2019-03-29 14:15:53 +00:00
id: string, // the id of the participant
displayName: string // the display name of the participant
2017-01-26 01:14:30 +00:00
}
```
2017-01-30 09:49:05 +00:00
* **participantLeft** - event notifications about participants that leave the room. The listener will receive an object with the following structure:
```javascript
2017-01-26 01:14:30 +00:00
{
2019-03-29 14:15:53 +00:00
id: string // the id of the participant
2017-01-26 01:14:30 +00:00
}
```
2017-01-30 09:49:05 +00:00
* **videoConferenceJoined** - event notifications fired when the local user has joined the video conference. The listener will receive an object with the following structure:
```javascript
2017-01-26 01:14:30 +00:00
{
2019-03-29 14:15:53 +00:00
roomName: string, // the room name of the conference
id: string, // the id of the local participant
displayName: string, // the display name of the local participant
avatarURL: string // the avatar URL of the local participant
2017-01-26 01:14:30 +00:00
}
```
2017-01-30 09:49:05 +00:00
* **videoConferenceLeft** - event notifications fired when the local user has left the video conference. The listener will receive an object with the following structure:
```javascript
2017-01-26 01:14:30 +00:00
{
2019-03-29 14:15:53 +00:00
roomName: string // the room name of the conference
2017-01-26 01:14:30 +00:00
}
```
2017-08-04 08:15:11 +00:00
* **videoAvailabilityChanged** - event notifications about video availability status changes. The listener will receive an object with the following structure:
```javascript
{
2019-03-29 14:15:53 +00:00
available: boolean // new available status - boolean
2017-08-04 08:15:11 +00:00
}
```
* **videoMuteStatusChanged** - event notifications about video mute status changes. The listener will receive an object with the following structure:
```javascript
{
2019-03-29 14:15:53 +00:00
muted: boolean // new muted status - boolean
2017-08-04 08:15:11 +00:00
}
```
2017-01-26 01:14:30 +00:00
* **readyToClose** - event notification fired when Jitsi Meet is ready to be closed (hangup operations are completed).
2019-02-25 15:34:54 +00:00
* **subjectChange** - event notifications about subject of conference changes.
2019-02-17 14:40:24 +00:00
The listener will receive an object with the following structure:
```javascript
{
2019-03-29 14:15:53 +00:00
subject: string // the new subject
2019-02-17 14:40:24 +00:00
}
```
2017-01-30 09:49:05 +00:00
You can also add multiple event listeners by using `addEventListeners` .
2017-01-26 01:14:30 +00:00
This method requires one argument of type Object. The object argument must
2017-01-30 09:49:05 +00:00
have the names of the events as keys and the listeners of the events as values.
2017-04-03 15:48:46 +00:00
**NOTE: This method still exists but it is deprecated. JitsiMeetExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods.**
2017-01-26 01:14:30 +00:00
2017-01-30 09:49:05 +00:00
```javascript
2017-01-26 01:14:30 +00:00
function incomingMessageListener(object)
{
2017-01-30 09:49:05 +00:00
// ...
2017-01-26 01:14:30 +00:00
}
function outgoingMessageListener(object)
{
2017-01-30 09:49:05 +00:00
// ...
2017-01-26 01:14:30 +00:00
}
api.addEventListeners({
incomingMessage: incomingMessageListener,
2019-03-29 14:15:53 +00:00
outgoingMessage: outgoingMessageListener
});
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
If you want to remove a listener you can use `removeEventListener` method with argument the name of the event.
2017-04-03 15:48:46 +00:00
**NOTE: This method still exists but it is deprecated. JitsiMeetExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods( `removeListener` ).**
2017-01-30 09:49:05 +00:00
```javascript
2019-03-29 14:15:53 +00:00
api.removeEventListener('incomingMessage');
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
If you want to remove more than one event you can use `removeEventListeners` method with an Array with the names of the events as an argument.
2017-04-03 15:48:46 +00:00
**NOTE: This method still exists but it is deprecated. JitsiMeetExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods.**
2017-01-30 09:49:05 +00:00
```javascript
2019-03-29 14:15:53 +00:00
api.removeEventListeners([ 'incomingMessage', 'outgoingMessageListener' ]);
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
You can get the number of participants in the conference with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
const numberOfParticipants = api.getNumberOfParticipants();
2017-01-26 01:14:30 +00:00
```
2017-12-05 03:27:17 +00:00
You can get the avatar URL of a participant in the conference with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
const avatarURL = api.getAvatarURL(participantId);
2017-12-05 03:27:17 +00:00
```
You can get the display name of a participant in the conference with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
const displayName = api.getDisplayName(participantId);
2017-12-05 03:27:17 +00:00
```
2018-06-18 09:19:07 +00:00
You can get the email of a participant in the conference with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
const email = api.getEmail(participantId);
2018-06-18 09:19:07 +00:00
```
2017-07-13 18:10:32 +00:00
You can get the iframe HTML element where Jitsi Meet is loaded with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
const iframe = api.getIFrame();
2017-07-13 18:10:32 +00:00
```
2017-08-04 08:15:11 +00:00
You can check whether the audio is muted with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
api.isAudioMuted().then(muted => {
2017-08-04 08:15:11 +00:00
...
});
```
You can check whether the video is muted with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
api.isVideoMuted().then(muted => {
2017-08-04 08:15:11 +00:00
...
});
```
You can check whether the audio is available with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
api.isAudioAvailable().then(available => {
2017-08-04 08:15:11 +00:00
...
});
```
You can check whether the video is available with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
api.isVideoAvailable().then(available => {
2017-08-04 08:15:11 +00:00
...
});
```
2018-04-30 12:08:11 +00:00
You can invite new participants to the call with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
api.invite([ {...}, {...}, {...} ]).then(() => {
2018-04-30 12:08:11 +00:00
// success
2019-03-29 14:15:53 +00:00
}).catch(() => {
2018-04-30 12:08:11 +00:00
// failure
});
```
**NOTE: The format of the invitees in the array depends on the invite service used for the deployment.**
2017-01-30 09:49:05 +00:00
You can remove the embedded Jitsi Meet Conference with the following API function:
```javascript
2019-03-29 14:15:53 +00:00
api.dispose();
2017-01-26 01:14:30 +00:00
```
2017-01-30 09:49:05 +00:00
NOTE: It's a good practice to remove the conference before the page is unloaded.
[config.js]: https://github.com/jitsi/jitsi-meet/blob/master/config.js
[interface_config.js]: https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js
2017-03-31 16:38:44 +00:00
[EventEmitter]: https://nodejs.org/api/events.html