|
|
@@ -161,6 +161,15 @@ export default class RTC extends Listenable {
|
|
161
|
161
|
*/
|
|
162
|
162
|
this._lastNEndpoints = null;
|
|
163
|
163
|
|
|
|
164
|
+ /**
|
|
|
165
|
+ * The number representing the maximum video height the local client
|
|
|
166
|
+ * should receive from the bridge.
|
|
|
167
|
+ *
|
|
|
168
|
+ * @type {number|undefined}
|
|
|
169
|
+ * @private
|
|
|
170
|
+ */
|
|
|
171
|
+ this._maxFrameHeight = undefined;
|
|
|
172
|
+
|
|
164
|
173
|
/**
|
|
165
|
174
|
* The endpoint ID of currently pinned participant or <tt>null</tt> if
|
|
166
|
175
|
* no user is pinned.
|
|
|
@@ -251,11 +260,17 @@ export default class RTC extends Listenable {
|
|
251
|
260
|
this._pinnedEndpoint);
|
|
252
|
261
|
this._channel.sendSelectedEndpointMessage(
|
|
253
|
262
|
this._selectedEndpoint);
|
|
|
263
|
+
|
|
|
264
|
+ if (typeof this._maxFrameHeight !== 'undefined') {
|
|
|
265
|
+ this._channel.sendReceiverVideoConstraintMessage(
|
|
|
266
|
+ this._maxFrameHeight);
|
|
|
267
|
+ }
|
|
254
|
268
|
} catch (error) {
|
|
255
|
269
|
GlobalOnErrorHandler.callErrorHandler(error);
|
|
256
|
270
|
logger.error(
|
|
257
|
271
|
`Cannot send selected(${this._selectedEndpoint})`
|
|
258
|
|
- + `pinned(${this._pinnedEndpoint}) endpoint message.`,
|
|
|
272
|
+ + `pinned(${this._pinnedEndpoint})`
|
|
|
273
|
+ + `frameHeight(${this._maxFrameHeight}) endpoint message`,
|
|
259
|
274
|
error);
|
|
260
|
275
|
}
|
|
261
|
276
|
|
|
|
@@ -327,14 +342,17 @@ export default class RTC extends Listenable {
|
|
327
|
342
|
|
|
328
|
343
|
/**
|
|
329
|
344
|
* Sets the maximum video size the local participant should receive from
|
|
330
|
|
- * remote participants. Will no-op if no data channel has been established.
|
|
|
345
|
+ * remote participants. Will cache the value and send it through the channel
|
|
|
346
|
+ * once it is created.
|
|
331
|
347
|
*
|
|
332
|
348
|
* @param {number} maxFrameHeightPixels the maximum frame height, in pixels,
|
|
333
|
349
|
* this receiver is willing to receive.
|
|
334
|
350
|
* @returns {void}
|
|
335
|
351
|
*/
|
|
336
|
352
|
setReceiverVideoConstraint(maxFrameHeight) {
|
|
337
|
|
- if (this._channel) {
|
|
|
353
|
+ this._maxFrameHeight = maxFrameHeight;
|
|
|
354
|
+
|
|
|
355
|
+ if (this._channel && this._channelOpen) {
|
|
338
|
356
|
this._channel.sendReceiverVideoConstraintMessage(maxFrameHeight);
|
|
339
|
357
|
}
|
|
340
|
358
|
}
|