jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
23.27k stars 6.76k forks source link

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

Open HannesOberreiter opened 1 day ago

HannesOberreiter commented 1 day ago

(closes old issue: https://github.com/jitsi/jitsi-meet/issues/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 commented 1 day ago

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 commented 1 day ago

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

saghul commented 23 hours ago

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

HannesOberreiter commented 23 hours ago

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 commented 23 hours ago

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

saghul commented 2 hours ago

has the CLA been signed?

HannesOberreiter commented 2 hours ago

Yes was earlier this year, company "certible".