stopRecorder method

  1. @override
Future<void> stopRecorder(
  1. FlutterSoundRecorderCallback callback
)
override

Implementation

@override
Future<void> stopRecorder(
  FlutterSoundRecorderCallback callback,
) async {
  //if (sub != null) {
  //  sub!.cancel();
  //  sub = null;
  //}
  //if (source != null) {
  //source!.disconnect();
  //source = null;
  //}
  //if (audioProcessor != null) {
  //audioProcessor!.disconnect();
  //audioProcessor = null;
  //}
  if (mediaRecorderWeb != null) {
    await mediaRecorderWeb!.stopRecorder(callback);
    mediaRecorderWeb = null;
  } else {
    FlutterSoundRecorder? session = getWebSession(callback);
    if (session != null)
      session.stopRecorder();
    else
      callback.log(Level.debug, 'Recorder already stopped');
  }
}