snapshot method

Future<void> snapshot({
  1. required String path,
  2. void completion(
    1. bool success,
    2. String filePath
    )?,
})

master-m3u8 === end snapshot

Implementation

/// snapshot
Future<void> snapshot(
    {required String path,
    void Function(bool success, String filePath)? completion}) async {
  if (path.isEmpty) {
    TTFLogger.i('FlutterTTSDKManager', 'snapshot path is empty');
    return;
  }
  await engineInstanceMethodChannel.invokeMethod('snapshot', path);
  if (completion != null) {
    snapshotCompletion = completion;
  }
}