[ui] remove TURN service toggle and simplify relay settings

This commit is contained in:
dijunkun
2026-10-25 02:40:21 +08:00
parent c03c8a63d4
commit 86bae6e1f4
17 changed files with 12 additions and 39 deletions
@@ -319,10 +319,7 @@ int ConfigCenter::SetTurnMode(TURN_MODE mode) {
return 0;
}
int ConfigCenter::SetTurn(bool enable_turn, bool force_relay) {
if (!enable_turn) {
return SetTurnMode(TURN_MODE::DISABLED);
}
int ConfigCenter::SetForceRelay(bool force_relay) {
if (!force_relay) {
return SetTurnMode(TURN_MODE::AUTO_UDP_TCP);
}
@@ -479,10 +476,6 @@ ConfigCenter::TURN_MODE ConfigCenter::GetTurnMode() const {
return turn_mode_;
}
bool ConfigCenter::IsEnableTurn() const {
return turn_mode_ != TURN_MODE::DISABLED;
}
bool ConfigCenter::IsForceRelay() const {
return turn_mode_ == TURN_MODE::FORCE_UDP || turn_mode_ == TURN_MODE::FORCE_TCP;
}
@@ -41,7 +41,7 @@ class ConfigCenter {
int SetScreenCaptureMethod(ScreenCaptureMethod method);
int SetVideoEncodeFormat(VIDEO_ENCODE_FORMAT video_encode_format);
int SetTurnMode(TURN_MODE turn_mode);
int SetTurn(bool enable_turn, bool force_relay);
int SetForceRelay(bool force_relay);
int SetServerHost(const std::string& signal_server_host);
int SetServerPort(int signal_server_port);
int SetServerEndpoint(const std::string& address, int port);
@@ -63,7 +63,6 @@ class ConfigCenter {
ScreenCaptureMethod GetScreenCaptureMethod() const;
VIDEO_ENCODE_FORMAT GetVideoEncodeFormat() const;
TURN_MODE GetTurnMode() const;
bool IsEnableTurn() const;
bool IsForceRelay() const;
bool IsEnableSrtp() const;
std::string GetSignalServerHost() const;