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(), orroom.setVideoEffects()in a live stream, with aVideoEffectsConfigwhosebackgroundmode isVideoEffectsBackgroundMode.BLUR. Blur runs on the defaultVideoEffectsPipeline.LEGACYpipeline. On Android, your app must also depend oncom.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