Browse Source

ref: Remove pinEndpoint. (#1440)

"Pinned" endpoints are deprecated, use "selected" instead.
dev1
bgrozev 4 years ago
parent
commit
d5be7ad2d7
No account linked to committer's email address
3 changed files with 0 additions and 54 deletions
  1. 0
    11
      JitsiConference.js
  2. 0
    16
      modules/RTC/BridgeChannel.js
  3. 0
    27
      modules/RTC/RTC.js

+ 0
- 11
JitsiConference.js View File

1338
     this.rtc.selectEndpoints(participantIds);
1338
     this.rtc.selectEndpoints(participantIds);
1339
 };
1339
 };
1340
 
1340
 
1341
-/**
1342
- * Elects the participant with the given id to be the pinned participant in
1343
- * order to always receive video for this participant (even when last n is
1344
- * enabled).
1345
- * @param participantId the identifier of the participant
1346
- * @throws NetworkError or InvalidStateError or Error if the operation fails.
1347
- */
1348
-JitsiConference.prototype.pinParticipant = function(participantId) {
1349
-    this.rtc.pinEndpoint(participantId);
1350
-};
1351
-
1352
 /**
1341
 /**
1353
  * Obtains the current value for "lastN". See {@link setLastN} for more info.
1342
  * Obtains the current value for "lastN". See {@link setLastN} for more info.
1354
  * @returns {number}
1343
  * @returns {number}

+ 0
- 16
modules/RTC/BridgeChannel.js View File

207
         });
207
         });
208
     }
208
     }
209
 
209
 
210
-    /**
211
-     * Sends a "pinned endpoint changed" message via the channel.
212
-     * @param {string} endpointId The id of the pinned endpoint.
213
-     * @throws NetworkError or InvalidStateError from RTCDataChannel#send (@see
214
-     * {@link https://developer.mozilla.org/docs/Web/API/RTCDataChannel/send})
215
-     * or from WebSocket#send or Error with "No opened channel" message.
216
-     */
217
-    sendPinnedEndpointMessage(endpointId) {
218
-        logger.log(`Sending pinned endpoint: ${endpointId}.`);
219
-
220
-        this._send({
221
-            colibriClass: 'PinnedEndpointChangedEvent',
222
-            pinnedEndpoint: endpointId || null
223
-        });
224
-    }
225
-
226
     /**
210
     /**
227
      * Sends a "selected endpoints changed" message via the channel.
211
      * Sends a "selected endpoints changed" message via the channel.
228
      *
212
      *

+ 0
- 27
modules/RTC/RTC.js View File

171
          */
171
          */
172
         this._maxFrameHeight = undefined;
172
         this._maxFrameHeight = undefined;
173
 
173
 
174
-        /**
175
-         * The endpoint ID of currently pinned participant or <tt>null</tt> if
176
-         * no user is pinned.
177
-         * @type {string|null}
178
-         * @private
179
-         */
180
-        this._pinnedEndpoint = null;
181
-
182
         /**
174
         /**
183
          * The endpoint IDs of currently selected participants.
175
          * The endpoint IDs of currently selected participants.
184
          *
176
          *
291
             // we want the notification to trigger even if userJid
283
             // we want the notification to trigger even if userJid
292
             // is undefined, or null.
284
             // is undefined, or null.
293
             try {
285
             try {
294
-                this._channel.sendPinnedEndpointMessage(
295
-                    this._pinnedEndpoint);
296
                 this._channel.sendSelectedEndpointsMessage(
286
                 this._channel.sendSelectedEndpointsMessage(
297
                     this._selectedEndpoints);
287
                     this._selectedEndpoints);
298
 
288
 
304
                 GlobalOnErrorHandler.callErrorHandler(error);
294
                 GlobalOnErrorHandler.callErrorHandler(error);
305
                 logger.error(
295
                 logger.error(
306
                     `Cannot send selected(${this._selectedEndpoint})`
296
                     `Cannot send selected(${this._selectedEndpoint})`
307
-                    + `pinned(${this._pinnedEndpoint})`
308
                     + `frameHeight(${this._maxFrameHeight}) endpoint message`,
297
                     + `frameHeight(${this._maxFrameHeight}) endpoint message`,
309
                     error);
298
                     error);
310
             }
299
             }
434
         }
423
         }
435
     }
424
     }
436
 
425
 
437
-    /**
438
-     * Elects the participant with the given id to be the pinned participant in
439
-     * order to always receive video for this participant (even when last n is
440
-     * enabled).
441
-     * @param {stirng} id The user id.
442
-     * @throws NetworkError or InvalidStateError or Error if the operation
443
-     * fails.
444
-     */
445
-    pinEndpoint(id) {
446
-        // Cache the value if channel is missing, till we open it.
447
-        this._pinnedEndpoint = id;
448
-        if (this._channel && this._channel.isOpen()) {
449
-            this._channel.sendPinnedEndpointMessage(id);
450
-        }
451
-    }
452
-
453
     /**
426
     /**
454
      *
427
      *
455
      * @param eventType
428
      * @param eventType

Loading…
Cancel
Save