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: