Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with setMaxVideoBW and updateSimulcastLayersBitrate #1733

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

lodoyun
Copy link
Contributor

@lodoyun lodoyun commented Jun 30, 2021

Description

This PR fixes 2 issues:

  1. updateSimulcastLayersBitrate could update the structure passed as parameters if the bitrate specified was over the max. This could cause problems in the application if it happened to repeatedly use the same structure.
  2. We were not updating the layers properly when setting MaxVideoBW. That could lead to a case where some of the layers did not comply with the maxVideoBW.

[] It needs and includes Unit Tests

Changes in Client or Server public APIs

[] It includes documentation for these changes in /doc.

Copy link
Contributor

@jcague jcague left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -617,16 +625,14 @@ const Stream = (altConnectionHelpers, specInput) => {
that.updateSimulcastLayersBitrate = (bitrates) => {
if (that.pc && that.local) {
// limit with maxVideoBW
const limitedBitrates = bitrates;
const limitedBitrates = Object.assign({}, bitrates);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@lodoyun lodoyun merged commit 2cccc6f into lynckia:master Jul 1, 2021
@lodoyun lodoyun deleted the fix/updateSimulcastLayers branch July 1, 2021 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants