snapshot method
Takes a snapshot of the current video frame and saves it as a PNG file. 截取当前视频画面并保存为 PNG 文件。
- On iOS: saves with filename only (e.g.,
1234567890.png
). iOS:仅使用文件名(如1234567890.png
)。 - On Android: saves to
$_snapShotPath/snapshot_1234567890.png
. Android:保存至$_snapShotPath/snapshot_1234567890.png
。
Filename includes a timestamp to ensure uniqueness. 文件名含时间戳,确保唯一性。
Implementation
void snapshot(String path) {
_aliPlayer.snapshot(path);
}