takeSnapshotWithConfig abstract method

Future<void> takeSnapshotWithConfig({
  1. required int uid,
  2. required SnapshotConfig config,
})

Takes a screenshot of the video at the specified observation point.

This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.

  • uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
  • config The configuration of the snaptshot. See SnapshotConfig.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

Future<void> takeSnapshotWithConfig(
    {required int uid, required SnapshotConfig config});