mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[fix] use reliable ice by default
This commit is contained in:
@@ -202,6 +202,7 @@ int PeerConnection::Init(PeerConnectionParams params,
|
|||||||
ice_ready_ = false;
|
ice_ready_ = false;
|
||||||
if (offer_peer_ && try_rejoin_with_turn_) {
|
if (offer_peer_ && try_rejoin_with_turn_) {
|
||||||
enable_turn_ = true;
|
enable_turn_ = true;
|
||||||
|
reliable_ice_ = false;
|
||||||
LOG_INFO(
|
LOG_INFO(
|
||||||
"Ice failed, destroy ice agent and rereate it with TURN enabled");
|
"Ice failed, destroy ice agent and rereate it with TURN enabled");
|
||||||
|
|
||||||
@@ -809,8 +810,8 @@ void PeerConnection::ProcessIceWorkMsg(const IceWorkMsg &msg) {
|
|||||||
on_ice_status_change_);
|
on_ice_status_change_);
|
||||||
|
|
||||||
ice_transmission_list_[remote_user_id]->SetLocalCapabilities(
|
ice_transmission_list_[remote_user_id]->SetLocalCapabilities(
|
||||||
trickle_ice_, false, enable_turn_, false, video_payload_types_,
|
trickle_ice_, reliable_ice_, enable_turn_, false,
|
||||||
audio_payload_types_);
|
video_payload_types_, audio_payload_types_);
|
||||||
|
|
||||||
ice_transmission_list_[remote_user_id]->SetOnReceiveVideoFunc(
|
ice_transmission_list_[remote_user_id]->SetOnReceiveVideoFunc(
|
||||||
on_receive_video_);
|
on_receive_video_);
|
||||||
@@ -856,8 +857,8 @@ void PeerConnection::ProcessIceWorkMsg(const IceWorkMsg &msg) {
|
|||||||
on_ice_status_change_);
|
on_ice_status_change_);
|
||||||
|
|
||||||
ice_transmission_list_[remote_user_id]->SetLocalCapabilities(
|
ice_transmission_list_[remote_user_id]->SetLocalCapabilities(
|
||||||
trickle_ice_, false, enable_turn_, false, video_payload_types_,
|
trickle_ice_, reliable_ice_, enable_turn_, false,
|
||||||
audio_payload_types_);
|
video_payload_types_, audio_payload_types_);
|
||||||
|
|
||||||
ice_transmission_list_[remote_user_id]->SetOnReceiveVideoFunc(
|
ice_transmission_list_[remote_user_id]->SetOnReceiveVideoFunc(
|
||||||
on_receive_video_);
|
on_receive_video_);
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ class PeerConnection {
|
|||||||
bool av1_encoding_ = false;
|
bool av1_encoding_ = false;
|
||||||
bool enable_turn_ = false;
|
bool enable_turn_ = false;
|
||||||
bool trickle_ice_ = true;
|
bool trickle_ice_ = true;
|
||||||
|
bool reliable_ice_ = true;
|
||||||
TraversalMode mode_ = TraversalMode::P2P;
|
TraversalMode mode_ = TraversalMode::P2P;
|
||||||
bool try_rejoin_with_turn_ = true;
|
bool try_rejoin_with_turn_ = true;
|
||||||
std::vector<int> video_payload_types_ = {RtpPacket::PAYLOAD_TYPE::H264,
|
std::vector<int> video_payload_types_ = {RtpPacket::PAYLOAD_TYPE::H264,
|
||||||
|
|||||||
Reference in New Issue
Block a user