Skip to main content
Version: 5.x.x

Virtual Background - Flutter

caution

The videosdk_media_effects plugin does not work with Flutter SDK v5.0.0. It depends on videosdk_webrtc, which you must remove when you upgrade to v5.0.0.

Use these instead:

  • Background blur: call VideoSDK.setVideoEffects(), or room.setVideoEffects() in a live stream, with a VideoEffectsConfig whose background mode is VideoEffectsBackgroundMode.BLUR. Blur runs on the default VideoEffectsPipeline.LEGACY pipeline. On Android, your app must also depend on com.google.mlkit:segmentation-selfie:16.0.0-beta6. See setVideoEffects().
  • Background image: on iOS, pass the image's file path or URL to room.setVideoProcessor(). Android has no built-in background image.
final applied = await VideoSDK.setVideoEffects(
const VideoEffectsConfig(
background: VideoEffectsBackground(mode: VideoEffectsBackgroundMode.BLUR),
),
);

To learn more, see Video Effects. For the other changes in v5.0.0, see the migration guide.

Got a Question? Ask us on discord