takeSnapshot abstract method
Takes a snapshot of a video stream.
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.filePath
The local path (including filename extensions) of the snapshot. For example: Windows: C:\Users<user_name>\AppData\Local\Agora<process_name>\example.jpg iOS: /App Sandbox/Library/Caches/example.jpg macOS: ~/Library/Logs/example.jpg Android: /storage/emulated/0/Android/data/
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> takeSnapshot({required int uid, required String filePath});