|
@@ -179,12 +179,12 @@ export default class RTC extends Listenable {
|
179
|
179
|
this._pinnedEndpoint = null;
|
180
|
180
|
|
181
|
181
|
/**
|
182
|
|
- * The endpoint ID of currently selected participant or <tt>null</tt> if
|
183
|
|
- * no user is selected.
|
184
|
|
- * @type {string|null}
|
|
182
|
+ * The endpoint IDs of currently selected participants.
|
|
183
|
+ *
|
|
184
|
+ * @type {Array}
|
185
|
185
|
* @private
|
186
|
186
|
*/
|
187
|
|
- this._selectedEndpoint = null;
|
|
187
|
+ this._selectedEndpoints = [];
|
188
|
188
|
|
189
|
189
|
// The last N change listener.
|
190
|
190
|
this._lastNChangeListener = this._onLastNChanged.bind(this);
|
|
@@ -258,8 +258,8 @@ export default class RTC extends Listenable {
|
258
|
258
|
try {
|
259
|
259
|
this._channel.sendPinnedEndpointMessage(
|
260
|
260
|
this._pinnedEndpoint);
|
261
|
|
- this._channel.sendSelectedEndpointMessage(
|
262
|
|
- this._selectedEndpoint);
|
|
261
|
+ this._channel.sendSelectedEndpointsMessage(
|
|
262
|
+ this._selectedEndpoints);
|
263
|
263
|
|
264
|
264
|
if (typeof this._maxFrameHeight !== 'undefined') {
|
265
|
265
|
this._channel.sendReceiverVideoConstraintMessage(
|
|
@@ -358,20 +358,21 @@ export default class RTC extends Listenable {
|
358
|
358
|
}
|
359
|
359
|
|
360
|
360
|
/**
|
361
|
|
- * Elects the participant with the given id to be the selected participant
|
362
|
|
- * in order to always receive video for this participant (even when last n
|
363
|
|
- * is enabled).
|
364
|
|
- * If there is no channel we store it and send it through the channel once
|
365
|
|
- * it is created.
|
366
|
|
- * @param {string} id The user id.
|
|
361
|
+ * Elects the participants with the given ids to be the selected
|
|
362
|
+ * participants in order to always receive video for this participant (even
|
|
363
|
+ * when last n is enabled). If there is no channel we store it and send it
|
|
364
|
+ * through the channel once it is created.
|
|
365
|
+ *
|
|
366
|
+ * @param {Array<string>} ids - The user ids.
|
367
|
367
|
* @throws NetworkError or InvalidStateError or Error if the operation
|
368
|
368
|
* fails.
|
|
369
|
+ * @returns {void}
|
369
|
370
|
*/
|
370
|
|
- selectEndpoint(id) {
|
371
|
|
- // Cache the value if channel is missing, till we open it.
|
372
|
|
- this._selectedEndpoint = id;
|
|
371
|
+ selectEndpoints(ids) {
|
|
372
|
+ this._selectedEndpoints = ids;
|
|
373
|
+
|
373
|
374
|
if (this._channel && this._channelOpen) {
|
374
|
|
- this._channel.sendSelectedEndpointMessage(id);
|
|
375
|
+ this._channel.sendSelectedEndpointsMessage(ids);
|
375
|
376
|
}
|
376
|
377
|
}
|
377
|
378
|
|