From 9eb93e0ed4aa935c1a6adfd02909b1a561e6c00b Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty <54324652+jallamsetty1@users.noreply.github.com> Date: Wed, 16 Feb 2022 16:09:29 -0500 Subject: [PATCH] fix(qualitycontrol) SenderVideoConstraintsV2 changed to SenderSourceConstraints. The colibri class name for the source name sender constraints changed from SenderVideoConstraintsV2 to SenderSourceConstraints. The new format is {colibriClass: 'SenderSourceConstraints', sourceName: 'b6746083-v0', maxHeight: 180} --- modules/RTC/BridgeChannel.js | 12 ++++++------ modules/qualitycontrol/SendVideoController.js | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/RTC/BridgeChannel.js b/modules/RTC/BridgeChannel.js index 64f510c715..191f229a15 100644 --- a/modules/RTC/BridgeChannel.js +++ b/modules/RTC/BridgeChannel.js @@ -376,21 +376,21 @@ export default class BridgeChannel { } break; } - case 'SenderVideoConstraintsV2': { + case 'SenderSourceConstraints': { if (FeatureFlags.isSourceNameSignalingEnabled()) { - const { sourceName, idealHeight } = obj; + const { sourceName, maxHeight } = obj; - if (typeof sourceName === 'string' && typeof idealHeight === 'number') { + if (typeof sourceName === 'string' && typeof maxHeight === 'number') { // eslint-disable-next-line object-property-newline - logger.info(`SenderVideoConstraintsV2: ${JSON.stringify({ sourceName, idealHeight })}`); + logger.info(`SenderSourceConstraints: ${JSON.stringify({ sourceName, maxHeight })}`); emitter.emit( RTCEvents.SENDER_VIDEO_CONSTRAINTS_CHANGED, { sourceName, - idealHeight + maxHeight } ); } else { - logger.error(`Invalid SenderVideoConstraintsV2: ${JSON.stringify(obj)}`); + logger.error(`Invalid SenderSourceConstraints: ${JSON.stringify(obj)}`); } } break; diff --git a/modules/qualitycontrol/SendVideoController.js b/modules/qualitycontrol/SendVideoController.js index 072b93c5a6..84b0dbf5fb 100644 --- a/modules/qualitycontrol/SendVideoController.js +++ b/modules/qualitycontrol/SendVideoController.js @@ -90,16 +90,16 @@ export default class SendVideoController { */ _onSenderConstraintsReceived(videoConstraints) { if (FeatureFlags.isSourceNameSignalingEnabled()) { - const { idealHeight, sourceName } = videoConstraints; + const { maxHeight, sourceName } = videoConstraints; const localVideoTracks = this._conference.getLocalVideoTracks() ?? []; for (const track of localVideoTracks) { // Propagate the sender constraint only if it has changed. if (track.getSourceName() === sourceName && (!this._sourceSenderConstraints.has(sourceName) - || this._sourceSenderConstraints.get(sourceName) !== idealHeight)) { - this._sourceSenderConstraints.set(sourceName, idealHeight); - logger.debug(`Sender constraints for source:${sourceName} changed to idealHeight:${idealHeight}`); + || this._sourceSenderConstraints.get(sourceName) !== maxHeight)) { + this._sourceSenderConstraints.set(sourceName, maxHeight); + logger.debug(`Sender constraints for source:${sourceName} changed to maxHeight:${maxHeight}`); this._propagateSendMaxFrameHeight(sourceName); } }