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

feat(external_api) add function to toggle virtual background #15324

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HannesOberreiter
Copy link
Contributor

(closes old issue: #9399)

New API command to change the virtual background with a custom base64 image.

// Command
api.executeCommand('setVirtualBackground', false, 'data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==');
// Function
api.setVirtualBackground(true, 'data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==');

@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 :(.

@damencho
Copy link
Member

@saghul and @hristoterezov do we prefer functions or commands?

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

🔍 This pull request has been sent to HackerOne's PullRequest review team because our automation detected one or more changes with potential security impact or requires further evaluation. Experts are now being assigned to this review based on relevant expertise and will validate or dismiss any security findings accordingly and post their feedback as comments within this pull request.


Check the status or cancel this secure code review here.

@saghul
Copy link
Member

saghul commented Nov 21, 2024

Given that the function is just a 1-liner that calls the command, so we really need it?

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

I don't have any security concerns with these changes.

Image of Graham C Graham C


Reviewed with ❤️ by PullRequest

@HannesOberreiter
Copy link
Contributor Author

My main reason for including the function was that it provides a convenient spot for JSDoc comments to explain its purpose. If we remove the function, we lose that explanation. Not sure if avoiding redundancy outweighs keeping the clarity.

@saghul
Copy link
Member

saghul commented Nov 21, 2024

That is a very good point. Let's keep it.

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.

4 participants