Calls configuration inlucdes the maximum number of members per call.

This commit is contained in:
Pierre HUBERT 2019-02-02 08:19:12 +01:00
parent 9d3fb3b342
commit e32fbc6355
4 changed files with 18 additions and 0 deletions

View File

@ -188,6 +188,7 @@ class CallsController {
//Give full configuration calls are enabled
if($config->get_enabled()){
$data["maximum_number_members"] = $config->get_maximum_number_members();
$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();

View File

@ -29,6 +29,7 @@ class CallsComponents {
$config = new CallsConfig();
$config->set_enabled($callConfig["enabled"]);
$config->set_maximum_number_members($callConfig["maximum_number_members"]);
$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"]);

View File

@ -9,6 +9,7 @@ class CallsConfig {
//Private fields
private $enabled = false;
private $maximum_number_members = -1;
private $signal_server_name;
private $signal_server_port;
private $is_signal_server_secure;
@ -28,6 +29,20 @@ class CallsConfig {
}
//Get the maximum number of members for a conversation
public function set_maximum_number_members(int $maximum_number_members){
$this->maximum_number_members = $maximum_number_members;
}
public function has_maximum_number_members() : bool {
return $this->maximum_number_members > 0;
}
public function get_maximum_number_members() : int {
return $this->maximum_number_members;
}
//Get Set Signal Server name
public function set_signal_server_name(string $signal_server_name){
$this->signal_server_name = $signal_server_name == "" ? null : $signal_server_name;

View File

@ -19,6 +19,7 @@ $config->set("calls", false);
/*
$config->set("calls", array(
"enabled" => true,
"maximum_number_members" => 2,
"signal_server_name" => "localhost",
"signal_server_port" => 8081,
"is_signal_server_secure" => false,