Fix the timing error when the candidate arrives before the answer sdp.
This commit is contained in:
parent
4ff07b58f4
commit
579b01a405
|
|
@ -658,6 +658,13 @@ class CallSession {
|
||||||
json['sdpMLineIndex']?.round() ?? 0,
|
json['sdpMLineIndex']?.round() ?? 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (direction == CallDirection.kOutgoing &&
|
||||||
|
pc != null &&
|
||||||
|
await pc!.getRemoteDescription() == null) {
|
||||||
|
remoteCandidates.add(candidate);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (pc != null && inviteOrAnswerSent && remotePartyId != null) {
|
if (pc != null && inviteOrAnswerSent && remotePartyId != null) {
|
||||||
try {
|
try {
|
||||||
await pc!.addCandidate(candidate);
|
await pc!.addCandidate(candidate);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue