stopPlayFile method

Future<void> stopPlayFile()

Stop playing file

Implementation

Future<void> stopPlayFile() async {
  if (_playerId == 0) return;
  _logs?.print('Stop play file callId:$myCallId playerId:$_playerId');
  try {
    await PjsipConnectFlutter().stopPlayFile(_playerId);
  } on PlatformException catch (err) {
    _logs?.print(
      'Can\'t stop playing file playerId:$_playerId Err: ${err.code} ${err.message}',
    );
    return Future.error((err.message == null) ? err.code : err.message!);
  }
}