|
@@ -659,6 +659,24 @@ JitsiConference.prototype.pinParticipant = function(participantId) {
|
659
|
659
|
this.rtc.pinEndpoint(participantId);
|
660
|
660
|
};
|
661
|
661
|
|
|
662
|
+/**
|
|
663
|
+ * Selects a new value for "lastN". The requested amount of videos are going
|
|
664
|
+ * to be delivered after the value is in effect. Set to -1 for unlimited or
|
|
665
|
+ * all available videos.
|
|
666
|
+ * @param lastN the new number of videos the user would like to receive.
|
|
667
|
+ * @throws Error or RangeError if the given value is not a number or is smaller
|
|
668
|
+ * than -1.
|
|
669
|
+ */
|
|
670
|
+JitsiConference.prototype.setLastN = function(lastN) {
|
|
671
|
+ if (!Number.isInteger(lastN) && !Number.parseInt(lastN)) {
|
|
672
|
+ throw new Error('Invalid value for lastN: ' + lastN);
|
|
673
|
+ }
|
|
674
|
+ if (lastN < -1) {
|
|
675
|
+ throw new RangeError('lastN cannot be smaller than -1');
|
|
676
|
+ }
|
|
677
|
+ this.rtc.setLastN(lastN | 0);
|
|
678
|
+};
|
|
679
|
+
|
662
|
680
|
/**
|
663
|
681
|
* @return Array<JitsiParticipant> an array of all participants in this
|
664
|
682
|
* conference.
|