Skip to main content
Version: 1.2.x

VideoSDKMediaEffects Plugin - Flutter

Introduction

The VideoSDKMediaEffects plugin enhances video applications with advanced media effects, including virtual backgrounds. Seamlessly integrating with your video SDK, it supports real-time processing and is optimized for Android and iOS devices, making it essential for adding professional-grade effects to mobile apps.

info
  • The Virtual Background methods from the VideoSDKMediaEffects plugin are supported only on Android and iOS devices.
  • The Virtual Background feature in VideoSDK can be utilized regardless of the meeting environment, including the pre-call screen.

VideoSDKMediaEffects Plugin Methods

applyVirtualBackground()

  • This method allows users to dynamically apply virtual background to their video stream during a live session.

Parameters

  • backgroundSource

    • type: Uri
    • REQUIRED
    • It specifies the URI of the background image to be used for the virtual background effect.

Returns

  • void

Example

Uri backgroundImageURI = Uri.parse("https://cdn.videosdk.live/virtual-background/cloud.jpeg");
VideosdkMediaEffects.applyVirtualBackground(backgroundSource: backgroundImageURI);

changeVirtualBackground()

  • This method allows users to easily switch their virtual background to a new image, enabling dynamic customization and enhancing the video experience.

Parameters

  • backgroundSource

    • type: Uri
    • REQUIRED
    • It specifies the URI of the new background image that user wants to switch to, for virtual background effect.

Returns

  • void

Example

Uri newBackgroundImageURI = Uri.parse("https://cdn.videosdk.live/virtual-background/san-fran.jpeg");
VideosdkMediaEffects.changeVirtualBackground(backgroundSource: newBackgroundImageURI);

removeVirtualBackground()

  • This method provides users with a convenient way to revert their video background to its original state, removing any previously applied virtual background.

Returns

  • void

Example

VideosdkMediaEffects.removeVirtualBackground();

Got a Question? Ask us on discord