From 48b8bd0f9f977ee8d54f96fc6788fbdc9be68ca7 Mon Sep 17 00:00:00 2001 From: KaustubhKumar05 Date: Tue, 18 Jun 2024 14:05:09 +0530 Subject: [PATCH] fix: update --- .../plugins/effects-virtual-background.mdx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/javascript/v2/how-to-guides/extend-capabilities/plugins/effects-virtual-background.mdx b/docs/javascript/v2/how-to-guides/extend-capabilities/plugins/effects-virtual-background.mdx index dbad07e20..24603056b 100644 --- a/docs/javascript/v2/how-to-guides/extend-capabilities/plugins/effects-virtual-background.mdx +++ b/docs/javascript/v2/how-to-guides/extend-capabilities/plugins/effects-virtual-background.mdx @@ -32,7 +32,7 @@ setBlur(blur) {} /** * Sets the virtual background using the provided media URL. * @param {HMSEffectsBackground} url - The media URL to set as the virtual background. - * Alternatively, the background image can be loaded beforehand and passed to setBackground as objectURL + * Alternatively, the background image can be downloaded beforehand and passed to setBackground as objectURL * @returns {void} */ setBackground(url) {} @@ -80,14 +80,14 @@ stop() {} Callbacks supported by the plugin: -On initialization +On initialization, after the required resources are downloaded by the plugin: ``` const effectsPlugin = new HMSEffectsPlugin(, () => console.log("Plugin initialised")); ``` -On resolution change (on device rotation or when the video aspect ratio changes) +On resolution change (on device rotation or when the video aspect ratio changes): ``` effectsPlugin.onResolutionChange = (width: number, height: number) => { @@ -95,8 +95,6 @@ effectsPlugin.onResolutionChange = (width: number, height: number) => { } ``` - - ## Instantiate Virtual Background The SDK key for effects is needed to instantiate the `HMSEffectsPlugin` class: