onSnapshotTaken property

void Function(RtcConnection connection, int uid, String filePath, int width, int height, int errCode)? onSnapshotTaken
final

Reports the result of taking a video snapshot. After a successful takeSnapshot method call, the SDK triggers this callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.

  • uid The user ID. A uid of 0 indicates the local user.
  • filePath The local path of the snapshot.
  • width The width (px) of the snapshot.
  • height The height (px) of the snapshot.
  • errCode The message that confirms success or gives the reason why the snapshot is not successfully taken:0: Success.< 0: Failure:-1: The SDK fails to write data to a file or encode a JPEG image.-2: The SDK does not find the video stream of the specified user within one second after the takeSnapshot method call succeeds.-3: Calling the takeSnapshot method too frequently.

Implementation

final void Function(RtcConnection connection, int uid, String filePath,
    int width, int height, int errCode)? onSnapshotTaken;