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 the snapshot taken.
connection
The connection information. See RtcConnection.uid
The user ID. One 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. The possible reasons are: local capture stops, remote end stops publishing, or video data processing is blocked. -3: Calling the takeSnapshot method too frequently.
Implementation
final void Function(RtcConnection connection, int uid, String filePath,
int width, int height, int errCode)? onSnapshotTaken;