New setting background_video

This commit is contained in:
FusionPBX
2024-06-18 09:32:19 -06:00
committed by GitHub
parent 7499606fcb
commit 02db089d8f
15 changed files with 77 additions and 16 deletions

View File

@@ -63,6 +63,14 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set a secondary background color, for a gradient effect.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3f9e9e72-b998-4ebd-bb45-725c49126fc2";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "background_video";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/themes/default/videos/backgrounds/video.mp4";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the value with the full path and file name.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "18a0c698-738e-4d88-a592-115dde20730f";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "header_user_visible";
@@ -2711,4 +2719,4 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Display A-leg/left and B-leg/right channel audio waveforms on a single axis.";
?>
?>

View File

@@ -479,6 +479,18 @@ else { //default: white
background-size:cover;
}
#background-video {
width: 100vw;
height: 100vh;
object-fit: cover;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: -2;
}
pre {
white-space: pre-wrap;
color: <?=$pre_text_color?>;
@@ -3337,4 +3349,4 @@ else { //default: white
//output custom css
echo $custom_css_code;
?>
?>

View File

@@ -1089,7 +1089,7 @@
//add new options from the json results
for (var i=0; i < obj.length; i++) {
//get the variables
domain_uuid = obj[i].domain_uuid;
domain_name = obj[i].domain_name;
@@ -1114,7 +1114,7 @@
div.style.background = '{$domain_selector_background_color_2}';
}
//set the active domain style
//set the active domain style
if ('{$domain_uuid}' == obj[i].domain_uuid) {
div.style.background = '{$domain_active_background_color}';
div.style.fontWeight = 'bold';
@@ -1161,6 +1161,13 @@
</head>
<body>
{*//video background *}
{if !empty($settings.theme.background_video)}
<video id="background-video" autoplay muted poster=" onloadstart="this.playbackRate = 1;">
<source src="{$settings.theme.background_video}" type="video/mp4">
</video>
{/if}
{*//message container *}
<div id='message_container'></div>
@@ -1222,3 +1229,4 @@
</body>
</html>