enableVirtualBackground static method
Future<void>
enableVirtualBackground(
{ - required Uint8List backgroundImage,
- double thresholdConfidence = 0.7,
})
Implementation
static Future<void> enableVirtualBackground({
required Uint8List backgroundImage,
double thresholdConfidence = 0.7,
}) async {
if (!WebRTC.platformIsMobile && !WebRTC.platformIsMacOS) return;
// Invoke the native method "enableVirtualBackground" through WebRTC plugin,
// passing the backgroundImage and thresholdConfidence as parameters.
WebRTC.invokeMethod("enableVirtualBackground", {
"imageBytes": backgroundImage,
"confidence": thresholdConfidence,
});
}