stopRecordFile method

Future<void> stopRecordFile()

Stop recording

Implementation

Future<void> stopRecordFile() async {
  if (!_isRecStarted) return;
  _logs?.print('Stop record file callId:$myCallId');
  try {
    await PjsipConnectFlutter().stopRecordFile(myCallId);
    _isRecStarted = false;
  } on PlatformException catch (err) {
    _logs?.print(
      'Can\'t stop recording file callId:$myCallId Err: ${err.code} ${err.message}',
    );
    return Future.error((err.message == null) ? err.code : err.message!);
  }
}