Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 committed Jun 18, 2024
1 parent 6521f88 commit 48b8bd0
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down Expand Up @@ -80,23 +80,21 @@ stop() {}

Callbacks supported by the plugin:

On initialization
On initialization, after the required resources are downloaded by the plugin:

```
const effectsPlugin = new HMSEffectsPlugin(<key>, () => 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) => {
console.log(`Resolution changed to ${width}x${height}`)
}
```



## Instantiate Virtual Background

The SDK key for effects is needed to instantiate the `HMSEffectsPlugin` class:
Expand Down

0 comments on commit 48b8bd0

Please sign in to comment.