startRecordVideo method
录像开始
Implementation
Future<int> startRecordVideo(String filePath) async {
if (_recordCompleter != null && !_recordCompleter!.isCompleted) {
await _recordCompleter!.future;
}
_recordCompleter = Completer();
final code = await _mediaPlayer.startRecord(
msg: SurfaceMessage(playHandle: _playHandle, textureId: textureId),
filePath: filePath);
if (code < 0) {
_recordCompleter!.complete();
_notifyCallBacks(false, null, code);
} else {
_notifyCallBacks(true, null, code);
}
return code;
}