From 550bcc33438a9c2e7cce8d146bde122fd7cb5b0f Mon Sep 17 00:00:00 2001 From: Pedro Rodriguez Date: Mon, 21 Jun 2021 13:42:03 +0200 Subject: [PATCH] Take into account passing "undefined" in updatesimulcastlayersbitrate (#1727) --- erizo_controller/erizoClient/src/Stream.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erizo_controller/erizoClient/src/Stream.js b/erizo_controller/erizoClient/src/Stream.js index 7dde97c23..139ae60b3 100644 --- a/erizo_controller/erizoClient/src/Stream.js +++ b/erizo_controller/erizoClient/src/Stream.js @@ -619,9 +619,10 @@ const Stream = (altConnectionHelpers, specInput) => { // limit with maxVideoBW const limitedBitrates = bitrates; Object.keys(limitedBitrates).forEach((key) => { - if (limitedBitrates[key] > that.maxVideoBW) { - log.warning(`Trying to set bitrate ${limitedBitrates[key]} higher that max ${that.maxVideoBW}` - + `in Layer ${key}`); + // explicitly passing undefined means assigning the max for that layer + if (limitedBitrates[key] > that.maxVideoBW || limitedBitrates[key] === undefined) { + log.info('message: updateSimulcastLayersBitrate defaulting to max bitrate,' + + `, layer :${key}, requested: ${limitedBitrates[key]}, max: ${that.maxVideoBW}`); limitedBitrates[key] = that.maxVideoBW; } limitedBitrates[key] =