captureSnapshot method

Future<Uint8List?> captureSnapshot()

captureSnapshot function used to capture a snapshot of the video stream of a local or remote peer's video.

Implementation

Future<Uint8List?> captureSnapshot() async {
  var result = await PlatformService.invokeMethod(
      PlatformMethod.captureSnapshot,
      arguments: {"track_id": trackId});
  if (result != null) {
    return base64.decode(result.replaceAll(RegExp(r'\s+'), ''));
  }
  return null;
}