Conference center raise hand feature (#5212)

* Update app_languages.php
* Update conference_interactive_inc.php
* Update conference_exec.php
* Create raise_hand.lua
* Update conference.conf
* Update app_languages.php
This commit is contained in:
hershyheilpern 2020-03-26 23:22:44 -04:00 committed by GitHub
parent bfc0b3279c
commit c1f47f31da
5 changed files with 45 additions and 4 deletions

View File

@ -526,6 +526,26 @@ $text['label-mute']['ru-ru'] = "Отключить микрофон";
$text['label-mute']['sv-se'] = "Stäng av mikrofon";
$text['label-mute']['uk-ua'] = "";
$text['label-hand_raised']['en-us'] = "Hand Raised";
$text['label-hand_raised']['ar-eg'] = "";
$text['label-hand_raised']['de-at'] = "";
$text['label-hand_raised']['de-ch'] = "";
$text['label-hand_raised']['de-de'] = "";
$text['label-hand_raised']['es-cl'] = "";
$text['label-hand_raised']['es-mx'] = "";
$text['label-hand_raised']['fr-ca'] = "";
$text['label-hand_raised']['fr-fr'] = "";
$text['label-hand_raised']['he-il'] = "";
$text['label-hand_raised']['it-it'] = "";
$text['label-hand_raised']['nl-nl'] = "";
$text['label-hand_raised']['pl-pl'] = "";
$text['label-hand_raised']['pt-br'] = "";
$text['label-hand_raised']['pt-pt'] = "";
$text['label-hand_raised']['ro-ro'] = "";
$text['label-hand_raised']['ru-ru'] = "";
$text['label-hand_raised']['sv-se'] = "";
$text['label-hand_raised']['uk-ua'] = "";
$text['label-moderator']['en-us'] = "Moderator";
$text['label-moderator']['en-gb'] = "Moderator";
$text['label-moderator']['ar-eg'] = "";

View File

@ -240,6 +240,8 @@
}
elseif ($data == "mute" || $data == "unmute" || $data == "mute non_moderator" || $data == "unmute non_moderator") {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
$switch_cmd = "uuid_setvar ".$uuid. " hand_raised false";
event_socket_request($fp, 'api '.$switch_cmd);
}
elseif ($data == "deaf" || $data == "undeaf" ) {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);

View File

@ -150,6 +150,7 @@
echo "<th class='hide-sm-dn'>".$text['label-joined']."</th>\n";
echo "<th class='hide-xs'>".$text['label-quiet']."</th>\n";
echo "<th class='hide-sm-dn'>".$text['label-floor']."</th>\n";
echo "<th class='hide-sm-dn'>".$text['label-hand_raised']."</th>\n";
echo "<th class='center'>".$text['label-capabilities']."</th>\n";
if (permission_exists('conference_interactive_energy')) {
echo "<th class='center'>".$text['label-energy']."</th>\n";
@ -162,7 +163,6 @@
}
echo "<th>&nbsp;</th>\n";
echo "</tr>\n";
if ($valid_xml && isset($xml->conference->members->member)) {
foreach ($xml->conference->members->member as $row) {
$id = $row->id;
@ -179,7 +179,8 @@
$caller_id_name = $row->caller_id_name;
$caller_id_name = urldecode($caller_id_name);
$caller_id_number = $row->caller_id_number;
$switch_cmd = "uuid_getvar ".$uuid. " hand_raised";
$hand_raised = (trim(event_socket_request($fp, 'api '.$switch_cmd)) == "true") ? "true" : "false";
//format seconds
$join_time_formatted = sprintf('%02d:%02d:%02d', ($join_time/3600), ($join_time/60%60), $join_time%60);
$last_talking_formatted = sprintf('%02d:%02d:%02d', ($last_talking/3600), ($last_talking/60%60), $last_talking%60);
@ -206,6 +207,7 @@
echo "<td ".$list_row_onclick." ".$list_row_title." class='hide-sm-dn'>".escape($join_time_formatted)."</td>\n";
echo "<td ".$list_row_onclick." ".$list_row_title." class='hide-xs'>".escape($last_talking_formatted)."</td>\n";
echo "<td ".$list_row_onclick." ".$list_row_title." class='hide-sm-dn'>".$text['label-'.(($flag_has_floor == "true") ? 'yes' : 'no')]."</td>\n";
echo "<td ".$list_row_onclick." ".$list_row_title." class='hide-sm-dn'>".$text['label-'.(($hand_raised == "true") ? 'yes' : 'no')]."</td>\n";
echo "<td ".$list_row_onclick." ".$list_row_title." class='center'>";
echo ($flag_can_speak == "true") ? "<i class='fas fa-microphone fa-fw' title=\"".$text['label-speak']."\"></i>" : "<i class='fas fa-microphone-slash fa-fw' title=\"".$text['label-speak']."\"></i>";
echo ($flag_can_hear == "true") ? "<i class='fas fa-headphones fa-fw' title=\"".$text['label-speak']."\" style='margin-left: 10px;'></i>" : "<i class='fas fa-deaf fa-fw' title=\"".$text['label-hear']."\" style='margin-left: 10px;'></i>";
@ -241,7 +243,7 @@
echo button::create(['type'=>'button','label'=>$text['label-mute'],'icon'=>'microphone-slash','onclick'=>"send_cmd('conference_exec.php?cmd=conference&name=".urlencode($conference_name)."&data=mute&id=".urlencode($id)."');"]);
}
else { //unmute
echo button::create(['type'=>'button','label'=>$text['label-unmute'],'icon'=>'microphone','onclick'=>"send_cmd('conference_exec.php?cmd=conference&name=".urlencode($conference_name)."&data=unmute&id=".urlencode($id)."');"]);
echo button::create(['type'=>'button','label'=>$text['label-unmute'],'icon'=>'microphone','onclick'=>"send_cmd('conference_exec.php?cmd=conference&name=".urlencode($conference_name)."&data=unmute&id=".urlencode($id)."&uuid=".escape($uuid)."');"]);
}
}
//deaf and undeaf
@ -266,4 +268,4 @@
echo "<br /><br />";
}
?>
?>

View File

@ -0,0 +1,15 @@
--options are true and false and toggle
data = argv[1];
if (data == "toggle") then
data = session:getVariable("hand_raised")
if(data == "true")then
session:setVariable("hand_raised","false")
else
session:setVariable("hand_raised","true")
end
elseif(data == "true")then
session:setVariable("hand_raised","true")
elseif(data == "false")then
session:setVariable("hand_raised","false")
end

View File

@ -22,6 +22,8 @@
<control action="vol listen zero" digits="5"/>
<control action="vol listen dn" digits="4"/>
<control action="hangup" digits=""/>
<control action="execute_application" digits="" data="lua app/conference_center/resources/scripts/raise_hand.lua true"/>
<control action="execute_application" digits="" data="lua app/conference_center/resources/scripts/raise_hand.lua false"/>
</group>
<group name="moderator">
<control action="mute" digits=""/>