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

fixed selectEndpoints resets constraints properly #2640

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

laky241
Copy link

@laky241 laky241 commented Feb 14, 2025

Fixes #2134

When calling selectEndpoints, previously selected participants were still present instead of being removed.

Modified setReceiverConstraints() in ReceiveVideoController.js
If selectedEndpoints is an empty array, it now resets the constraints properly instead of keeping old values.

this._receiverVideoConstraints.selectedEndpoints = undefined;

This ensures that when selectEndpoints is called

It completely resets selectedEndpoints instead of keeping old data.

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

if (constraints.selectedEndpoints && constraints.selectedEndpoints.length === 0) {
this._receiverVideoConstraints.selectedEndpoints = undefined;
}
this._rtc.setReceiverVideoConstraints(this._receiverVideoConstraints);
Copy link
Member

Choose a reason for hiding this comment

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

This line is duplicated below. You just need to call it once.

Copy link
Author

Choose a reason for hiding this comment

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

Apologies, I didn’t realize I had the exact same line twice. Thank you for catching that!

@saghul saghul requested a review from jallamsetty1 February 14, 2025 18:44
Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

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

LGTM but I defer to @jallamsetty1 for the final approval.

@laky241
Copy link
Author

laky241 commented Feb 15, 2025

thanks for the review and approval, @saghul I'll wait for @jallamsetty1's final approval.

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.

selectEndpoints with no selected endpoints should remove previously selected endpoint
3 participants