mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-25 04:58:59 +00:00
Can specify whether the signal server is secure or not
This commit is contained in:
parent
45875a2972
commit
9d3fb3b342
@ -190,6 +190,7 @@ class CallsController {
|
||||
if($config->get_enabled()){
|
||||
$data["signal_server_name"] = $config->get_signal_server_name();
|
||||
$data["signal_server_port"] = $config->get_signal_server_port();
|
||||
$data["is_signal_server_secure"] = $config->get_is_signal_server_secure();
|
||||
$data["stun_server"] = $config->get_stun_server();
|
||||
$data["turn_server"] = $config->get_turn_server();
|
||||
$data["turn_username"] = $config->get_turn_username();
|
||||
|
@ -31,6 +31,7 @@ class CallsComponents {
|
||||
$config->set_enabled($callConfig["enabled"]);
|
||||
$config->set_signal_server_name($callConfig["signal_server_name"]);
|
||||
$config->set_signal_server_port($callConfig["signal_server_port"]);
|
||||
$config->set_is_signal_server_secure($callConfig["is_signal_server_secure"]);
|
||||
$config->set_stun_server($callConfig["stun_server"]);
|
||||
$config->set_turn_server($callConfig["turn_server"]);
|
||||
$config->set_turn_username($callConfig["turn_username"]);
|
||||
|
@ -11,6 +11,7 @@ class CallsConfig {
|
||||
private $enabled = false;
|
||||
private $signal_server_name;
|
||||
private $signal_server_port;
|
||||
private $is_signal_server_secure;
|
||||
private $stun_server;
|
||||
private $turn_server;
|
||||
private $turn_username;
|
||||
@ -54,6 +55,14 @@ class CallsConfig {
|
||||
return $this->signal_server_port;
|
||||
}
|
||||
|
||||
//Get and set secure state of the signaling server
|
||||
public function set_is_signal_server_secure(bool $is_signal_server_secure){
|
||||
$this->is_signal_server_secure = $is_signal_server_secure;
|
||||
}
|
||||
|
||||
public function get_is_signal_server_secure() : bool {
|
||||
return $this->is_signal_server_secure;
|
||||
}
|
||||
|
||||
//Get and set stun server
|
||||
public function set_stun_server(string $stun_server){
|
||||
|
@ -21,6 +21,7 @@ $config->set("calls", array(
|
||||
"enabled" => true,
|
||||
"signal_server_name" => "localhost",
|
||||
"signal_server_port" => 8081,
|
||||
"is_signal_server_secure" => false,
|
||||
"stun_server" => "stun:127.0.0.1:3478",
|
||||
"turn_server" => "turn:127.0.0.1:3478",
|
||||
"turn_username" => "anonymous",
|
||||
|
Loading…
Reference in New Issue
Block a user