Fix ice status check error

This commit is contained in:
dijunkun
2023-10-11 09:45:58 +08:00
parent aba06f3289
commit 683235fa3f
3 changed files with 3 additions and 9 deletions

View File

@@ -95,7 +95,7 @@ int PeerConnection::Init(PeerConnectionParams params,
};
on_ice_status_change_ = [this](std::string ice_status) {
if ("JUICE_STATE_COMPLETED" == ice_status) {
if ("completed" == ice_status) {
ice_ready_ = true;
b_force_i_frame_ = true;
LOG_INFO("Ice finish");
@@ -209,7 +209,7 @@ int PeerConnection::Leave() {
{"transmission_id", transmission_id_}};
if (ws_transport_) {
ws_transport_->Send(message.dump());
LOG_INFO("[{}] sends leave transmission [{}] notification ",
LOG_INFO("[{}] sends leave transmission [{}] notification ", user_id_,
transmission_id_);
}
return 0;

View File

@@ -11,11 +11,6 @@
using nlohmann::json;
const std::vector<std::string> ice_status = {
"JUICE_STATE_DISCONNECTED", "JUICE_STATE_GATHERING",
"JUICE_STATE_CONNECTING", "JUICE_STATE_CONNECTED",
"JUICE_STATE_COMPLETED", "JUICE_STATE_FAILED"};
IceTransmission::IceTransmission(
bool offer_peer, std::string &transmission_id, std::string &user_id,
std::string &remote_user_id,