onAnswerReceived method
Implementation
Future<void> onAnswerReceived(
RTCSessionDescription answer, SDPStreamMetadata? metadata) async {
if (metadata != null) {
_updateRemoteSDPStreamMetadata(metadata);
}
if (direction == CallDirection.kOutgoing) {
setCallState(CallState.kConnecting);
await pc!.setRemoteDescription(answer);
for (final candidate in remoteCandidates) {
await pc!.addCandidate(candidate);
}
}
/// Send select_answer event.
await sendSelectCallAnswer(
opts.room, callId, Timeouts.lifetimeMs, localPartyId, remotePartyId!);
}