|
|
@@ -200,6 +200,8 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
|
200
|
200
|
* authentication.
|
|
201
|
201
|
* @param {string} [options.onload] - The onload function that will listen
|
|
202
|
202
|
* for iframe onload event.
|
|
|
203
|
+ * @param {Array<Object>} [options.invitees] - Array of objects containing
|
|
|
204
|
+ * information about new participants that will be invited in the call.
|
|
203
|
205
|
*/
|
|
204
|
206
|
constructor(domain, ...args) {
|
|
205
|
207
|
super();
|
|
|
@@ -212,7 +214,8 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
|
212
|
214
|
interfaceConfigOverwrite = {},
|
|
213
|
215
|
noSSL = false,
|
|
214
|
216
|
jwt = undefined,
|
|
215
|
|
- onload = undefined
|
|
|
217
|
+ onload = undefined,
|
|
|
218
|
+ invitees
|
|
216
|
219
|
} = parseArguments(args);
|
|
217
|
220
|
|
|
218
|
221
|
this._parentNode = parentNode;
|
|
|
@@ -232,6 +235,7 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
|
232
|
235
|
}
|
|
233
|
236
|
})
|
|
234
|
237
|
});
|
|
|
238
|
+ this._invitees = invitees;
|
|
235
|
239
|
this._isLargeVideoVisible = true;
|
|
236
|
240
|
this._numberOfParticipants = 0;
|
|
237
|
241
|
this._participants = {};
|
|
|
@@ -362,6 +366,9 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
|
362
|
366
|
|
|
363
|
367
|
switch (name) {
|
|
364
|
368
|
case 'video-conference-joined':
|
|
|
369
|
+ if (this._invitees) {
|
|
|
370
|
+ this.invite(this._invitees);
|
|
|
371
|
+ }
|
|
365
|
372
|
this._myUserID = userID;
|
|
366
|
373
|
this._participants[userID] = {
|
|
367
|
374
|
avatarURL: data.avatarURL
|
|
|
@@ -575,6 +582,19 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
|
575
|
582
|
});
|
|
576
|
583
|
}
|
|
577
|
584
|
|
|
|
585
|
+ /**
|
|
|
586
|
+ * Invite people to the call.
|
|
|
587
|
+ *
|
|
|
588
|
+ * @param {Array<Object>} invitees - The invitees.
|
|
|
589
|
+ * @returns {Promise} - Resolves on success and rejects on failure.
|
|
|
590
|
+ */
|
|
|
591
|
+ invite(invitees) {
|
|
|
592
|
+ return this._transport.sendRequest({
|
|
|
593
|
+ name: 'invite',
|
|
|
594
|
+ invitees
|
|
|
595
|
+ });
|
|
|
596
|
+ }
|
|
|
597
|
+
|
|
578
|
598
|
/**
|
|
579
|
599
|
* Returns the audio mute status.
|
|
580
|
600
|
*
|