Symptom
This article outlines how to change the strength of the Background Blur feature in the JavaScript SDK.
Applies To
- Video API
- JavaScript SDK
- Video Filters
- Background Blur
Resolution
- When you initiate a publisher or at any point afterward using applyVideoFilter method, you have the option to apply blur strength to a video using blurStrength property. There are two choices for blur strength: "low" or "high", with "high" being the default option.
- If you require a blur strength lower or higher than that, you can use ML Transformers and specify radius in pixels. "low" corresponds to 5px, and "high" corresponds to 10px. Here is an example code for implementing background blur using ML Transformers. Instead of using a preset option, you can modify line 14 as follows:
const config = {
transformerType: 'BackgroundBlur',
radius: 15
};
Additional Information
Please note that the video filter feature requires significant resources and is best suited for devices with high processing power. We recommend using this feature on supported devices.
Related to:
Articles in this section
- What happens if your session lasts more than 8 hours?
- Updates to using the Vonage Media Library in Native SDKs from version 2.27.x onwards
- React-Native Zoom In/Out Feature
- Why has the size of the iOS/Android SDKs increased so much from version 2.25.2?
- Integrating Picture-in-Picture with Vonage Video Web
- How to Use the Vonage Media Processor Library for Audio and Video Transformations
- Screen Sharing Support on Mobile Devices
- How to change the strength of the Background Blur?
- What are the minimum system requirements to use Video Filters or Transformers?
- Authenticating Callback Events for Video API