Skip to content

Commit

Permalink
chore: earlySDP can be private
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-Zimmerman committed Dec 18, 2024
1 parent 559d7c0 commit 25166b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/telnyx_webrtc/lib/telnyx_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class TelnyxClient {
}

// For instances where the SDP is not contained within ANSWER, but received early via a MEDIA message
bool earlySDP = false;
bool _earlySDP = false;

final String _storedHostAddress = DefaultConfig.socketHostAddress;
CredentialConfig? storedCredentialConfig;
Expand Down Expand Up @@ -968,7 +968,7 @@ class TelnyxClient {
}
mediaCall
.onRemoteSessionReceived(mediaReceived.inviteParams?.sdp);
earlySDP = true;
_earlySDP = true;
} else {
_logger.d('No SDP contained within Media Message');
}
Expand Down Expand Up @@ -998,15 +998,15 @@ class TelnyxClient {
answerCall
.onRemoteSessionReceived(inviteAnswer.inviteParams?.sdp);
onSocketMessageReceived(message);
} else if (earlySDP) {
} else if (_earlySDP) {
onSocketMessageReceived(message);
} else {
_logger.d(
'No SDP provided for Answer or Media, cannot initialize call',
);
answerCall.endCall(inviteAnswer.inviteParams?.callID);
}
earlySDP = false;
_earlySDP = false;
answerCall.stopAudio();
break;
}
Expand Down

0 comments on commit 25166b5

Please sign in to comment.