setPublisherRemoteSdp method

  1. @override
Future<void> setPublisherRemoteSdp(
  1. String sdp, [
  2. bool? isRecording
])
override

Implementation

@override
Future<void> setPublisherRemoteSdp(String sdp, [bool? isRecording]) async {
  if (isRecording != null) _isRecording = isRecording;

  final RTCSessionDescription description = RTCSessionDescription(
    sdp,
    DescriptionType.answer.type,
  );

  await _mParticipant?.setRemoteDescription(description);

  for (final candidate in _queuePublisherCandidates) {
    _socketEmiter.sendBroadcastCandidate(candidate);
  }

  _queuePublisherCandidates.clear();
  _flagPublisherCanAddCandidate = true;
}