please select
Call
  • Web
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration (React)
      • Integration (Vue3)
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • Configuring Nickname and Avatar
      • GroupCall
      • Floating Window
      • Custom Ringtone
      • Configure Resolution and Fill Mode
      • Monitoring Call Status
      • Language Settings
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
    • Client APIs
      • UIKit APIs
        • API Overview
        • TUICallKit
      • Engine APIs
        • TUICallEngine
        • TUICallEvent
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FAQs
      • All Platfroms
      • Web
      • ErrorCode
      • Release Notes
  • Android
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • Offline Call Push
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
    • Client APIs
      • UIKit APIs
        • API Overview
        • TUICallKit
        • TUICallObserver
        • Type Definition
      • Engine APIs
        • TUICallEngine
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FAQs
      • All Platforms
      • Android
      • ErrorCode
      • Release Notes
  • iOS
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • Offline Call Push
        • VoIP
        • APNs
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
    • Client APIs
      • UIKit APIs
        • API Overview
        • TUICallKit
        • TUICallObserver
        • Type Definition
      • Engine APIs
        • TUICallEngine
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FQAs
      • All Platform
      • iOS
      • ErrorCode
      • Release Notes
  • Flutter
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • offline Call Push
        • Notification
        • VoIP (Optional)
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
      • Beauty Effects
    • Client APIs
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FQAs
      • All Platform
      • Flutter
      • ErrorCode
      • Upgrading
      • Release Notes
Call

Virtual Background

TUICallKit has launched a new feature for virtual backgrounds, allowing users to set a blurry or image background during video calls. This hides the real calling environment, protects privacy, and makes the call more interesting. Next, this article will detail how to use this feature in the TUICallKit component.

Integration effect

The display effect of the TUICallKit component after integrating the virtual background feature is as follows.
Original Camera
Blurry Background Effect
Image Background Effect










Preparation Requirements

Before using the Virtual Background feature provided by Tencent Cloud, you need to visit the Console to activate Audio and Video Services for your application and purchase the Group Call package. For specific steps, please see Activate Service.

Enable Blurry Background

TUICallKit's UI design supports setting a blurry background. By calling the following interface, you can display a feature button for the blurry background on the UI. Clicking the button will directly enable the blurry background feature.
Note:
H5 is not supported yet, only PC supports it.
v3.2.4+ support.
import { TUICallKitServer } from "@tencentcloud/call-uikit-vue"; // take @tencentcloud/call-uikit-vue for example
TUICallKitServer.enableVirtualBackground(true);

Setting Image Background (Optional)

Implementing the image background requires users to save the image locally. After saving, call the following interface for setting (currently, only images with a local path are supported, images of uri are not supported yet).
import { TUICallKitServer } from "@tencentcloud/call-uikit-vue"; // take @tencentcloud/call-uikit-vue for example
TUICallKitServer.getTUICallEngineInstance().setVirtualBackground(imagePath: string)

FAQs

Enabling blurry background has no response or is delayed

Ensure you have purchased the audio and video call Group Call package, see Activate Service.
When the network is poor, the virtual background model file may not be completely downloaded, resulting in failure to open the virtual background.

Can the virtual background be turned on if the camera is turned off?

Not available.