Skip to content

Fix(external-api): Support blur and none types in setVirtualBackground.#17175

Open
san-rizz-777 wants to merge 2 commits intojitsi:masterfrom
san-rizz-777:feat/virtual-background-external-api
Open

Fix(external-api): Support blur and none types in setVirtualBackground.#17175
san-rizz-777 wants to merge 2 commits intojitsi:masterfrom
san-rizz-777:feat/virtual-background-external-api

Conversation

@san-rizz-777
Copy link

Problem

setVirtualBackground was hardcoded to VIRTUAL_BACKGROUND_TYPE.IMAGE
making it impossible to set blur or remove background via external API.

Changes

modules/API/API.js

  • Accept backgroundType parameter instead of hardcoding IMAGE
  • Support 'blur', 'image', 'desktop-blur', 'none'

modules/API/external/external_api.js

  • Update setVirtualBackground signature to pass backgroundType through

Usage

// Blur background
api.setVirtualBackground(true, 'blur');

// Custom image
api.setVirtualBackground(true, 'image', 'https://example.com/bg.jpg');

// Remove background
api.setVirtualBackground(false, 'none');

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

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