restartIce method

Future<void> restartIce()

Implementation

Future<void> restartIce() async {
  Logs().v('[VOIP] iceRestart.');
  // Needs restart ice on session.pc and renegotiation.
  iceGatheringFinished = false;
  final desc =
      await pc!.createOffer(_getOfferAnswerConstraints(iceRestart: true));
  await pc!.setLocalDescription(desc);
  localCandidates.clear();
}