snapImage method

Future<int> snapImage(
  1. String filePath
)

抓图

Implementation

Future<int> snapImage(String filePath) async {
  if (_snapCompleter != null) {
    await _snapCompleter!.future;
  }
  _snapCompleter = Completer();
  final code = await _mediaPlayer.snapImage(
      msg: SurfaceMessage(playHandle: _playHandle, textureId: textureId),
      filePath: filePath);
  _snapCompleter!.complete();
  return code;
}