enableVirtualBackground method
Future<void>
enableVirtualBackground(
{ - required Uint8List backgroundImage,
- double thresholdConfidence = 0.7,
})
override
Implementation
@override
Future<void> enableVirtualBackground({
required Uint8List backgroundImage,
double thresholdConfidence = 0.7,
}) async {
final MediaStream? segmentedStream = await startVirtualBackground(
backgroundImage: backgroundImage,
textureId: _mParticipant?.cameraSource?.textureId.toString(),
);
if (segmentedStream == null) return;
_replaceVideoTrack(segmentedStream.getVideoTracks().first);
}