Some more settings
This commit is contained in:
parent
512aa54700
commit
eeca625af6
@ -127,6 +127,8 @@ bool config::web::stun_enabled;
|
||||
std::string config::web::stun_host;
|
||||
uint16_t config::web::stun_port;
|
||||
bool config::web::enable_upnp;
|
||||
bool config::web::udp_enabled;
|
||||
bool config::web::tcp_enabled;
|
||||
|
||||
size_t config::log::vs_size;
|
||||
std::string config::log::path;
|
||||
@ -1489,6 +1491,18 @@ std::deque<std::shared_ptr<EntryBinding>> config::create_bindings() {
|
||||
ADD_DESCRIPTION("Port of the stun server");
|
||||
ADD_NOTE_RELOADABLE();
|
||||
}
|
||||
{
|
||||
CREATE_BINDING("webrtc.udp", 0);
|
||||
BIND_INTEGRAL(config::web::udp_enabled, true, false, true);
|
||||
ADD_DESCRIPTION("Enable UDP for theweb client");
|
||||
ADD_NOTE_RELOADABLE();
|
||||
}
|
||||
{
|
||||
CREATE_BINDING("webrtc.tcp", 0);
|
||||
BIND_INTEGRAL(config::web::tcp_enabled, true, false, true);
|
||||
ADD_DESCRIPTION("Enable TCP for theweb client");
|
||||
ADD_NOTE_RELOADABLE();
|
||||
}
|
||||
}
|
||||
{
|
||||
BIND_GROUP(geolocation);
|
||||
|
@ -214,6 +214,9 @@ namespace ts::config {
|
||||
extern bool stun_enabled;
|
||||
extern std::string stun_host;
|
||||
extern uint16_t stun_port;
|
||||
|
||||
extern bool tcp_enabled;
|
||||
extern bool udp_enabled;
|
||||
}
|
||||
|
||||
namespace threads {
|
||||
|
@ -72,8 +72,8 @@ VoiceBridge::VoiceBridge(const shared_ptr<WebClient>& owner) : _owner(owner) {
|
||||
if(config::web::stun_enabled)
|
||||
config->nice_config->stun_server = { config::web::stun_host, config::web::stun_port };
|
||||
|
||||
config->nice_config->allow_ice_udp = true;
|
||||
config->nice_config->allow_ice_tcp = false;
|
||||
config->nice_config->allow_ice_udp = config::web::udp_enabled;
|
||||
config->nice_config->allow_ice_tcp = config::web::tcp_enabled;
|
||||
config->nice_config->use_upnp = config::web::enable_upnp;
|
||||
|
||||
gioloop::initialize();
|
||||
|
Loading…
Reference in New Issue
Block a user