mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Introduce Event Services (#1653)
* Allow to enable/disable suspend & lock event handling * Fix Windows * Refactor event handling incl.CEC * Revert "Auxiliary commit to revert individual files from 0d9a8b8a3a4a09609a339f54c7d8a9384c561282" This reverts commit 80737d926ad151a07b2493dd1685ed502975cb2e. * Support Events for Grabbers generically * Have CECEvent to actions configurable, further clean-ups * Remove handleEvent from V4L2grabber, as grabber will be stopped on suspend * Validate that one CEC Event can only trigger one action * MacOS lock/unlock added * fast windows fix * Corrections * Fix CodeQL findings * add macos lock/unlock handler * Migration of CEC-config and have default actions * Correct target_link_libraries * Include Foundation * macOS include AppKit * Support Scheduled Events, cleanups. * Fix destructing * Fix coredump during free * Consider additional error sceanrio * Fix missing code * install desktop icons * correct bash logic --------- Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
11
assets/webconfig/content/conf_events.html
Normal file
11
assets/webconfig/content/conf_events.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header"><i class="fa fa-server fa-fw"></i><span data-i18n="main_menu_events">Event Services</span></h3>
|
||||
<div id="conf_cont">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/content_events.js"></script>
|
@@ -192,6 +192,12 @@
|
||||
"conf_network_tok_intro": "Here you can create and delete tokens for API authentication. Created tokens will only be displayed once.",
|
||||
"conf_network_tok_lastuse": "Last use",
|
||||
"conf_network_tok_title": "Token Management",
|
||||
"conf_cec_events_heading_title": "CEC Events",
|
||||
"conf_cec_events_intro": "Settings related to diffent CEC (Consumer Electronics Control) protocol events Hyperion can handle",
|
||||
"conf_os_events_heading_title": "Operating System Events",
|
||||
"conf_os_events_intro": "Settings related to diffent Operating System events Hyperion can handle",
|
||||
"conf_sched_events_heading_title": "Scheduled Events",
|
||||
"conf_sched_events_intro": "Settings related to scheduled, i.e. time based events, which Hyperion will handle",
|
||||
"conf_webconfig_label_intro": "Webconfiguration settings. Edit wisely.",
|
||||
"dashboard_active_instance": "Selected instance",
|
||||
"dashboard_alert_message_confedit": "Your Hyperion configuration has been modified. To apply it, restart Hyperion.",
|
||||
@@ -243,6 +249,30 @@
|
||||
"edt_append_pixel": "Pixel",
|
||||
"edt_append_s": "s",
|
||||
"edt_append_sdegree": "s/degree",
|
||||
"edt_conf_action_title": "Action",
|
||||
"edt_conf_action_expl": "Action to be applied",
|
||||
"edt_conf_action_record_validation_error": "The same event can trigger only one action. Clean up Actions $1",
|
||||
"edt_conf_audio_device_expl": "Selected audio input device",
|
||||
"edt_conf_audio_device_title": "Audio Device",
|
||||
"edt_conf_audio_effects_expl": "Select an effect on how the audio signal is transformed to",
|
||||
"edt_conf_audio_effects_title": "Audio Effects",
|
||||
"edt_conf_audio_effect_enum_vumeter": "VU-Meter",
|
||||
"edt_conf_audio_effect_hotcolor_expl": "Hot Color",
|
||||
"edt_conf_audio_effect_hotcolor_title": "Hot Color",
|
||||
"edt_conf_audio_effect_multiplier_expl": "Audio Signal Value multiplier",
|
||||
"edt_conf_audio_effect_multiplier_title": "Multiplier",
|
||||
"edt_conf_audio_effect_safecolor_expl": "Safe Color",
|
||||
"edt_conf_audio_effect_safecolor_title": "Safe Color",
|
||||
"edt_conf_audio_effect_safevalue_expl": "Safe Threshold",
|
||||
"edt_conf_audio_effect_safevalue_title": "Safe Threshold",
|
||||
"edt_conf_audio_effect_set_defaults": "Reset to default values",
|
||||
"edt_conf_audio_effect_tolerance_expl": "Tolerance used when auto calculating a signal multipler from 0-100",
|
||||
"edt_conf_audio_effect_tolerance_title": "Tolerance",
|
||||
"edt_conf_audio_effect_warncolor_expl": "Warning Color",
|
||||
"edt_conf_audio_effect_warncolor_title": "Warning Color",
|
||||
"edt_conf_audio_effect_warnvalue_expl": "Warning Threshold",
|
||||
"edt_conf_audio_effect_warnvalue_title": "Warning Threshold",
|
||||
"edt_conf_audio_heading_title": "Audio Capture",
|
||||
"edt_conf_bb_blurRemoveCnt_expl": "Number of pixels that get removed from the detected border to cut away blur.",
|
||||
"edt_conf_bb_blurRemoveCnt_title": "Blur pixel",
|
||||
"edt_conf_bb_borderFrameCnt_expl": "Number of frames before a consistent detected border is set.",
|
||||
@@ -258,6 +288,17 @@
|
||||
"edt_conf_bb_unknownFrameCnt_title": "Unknown frames",
|
||||
"edt_conf_bge_heading_title": "Background Effect/Color",
|
||||
"edt_conf_bobls_heading_title": "Boblight Server",
|
||||
"edt_conf_cec_actions_header_title": "Actions",
|
||||
"edt_conf_cec_actions_header_expl": "Define which action should take place on a recognised CEC event",
|
||||
"edt_conf_cec_actions_header_item_title": "Action",
|
||||
"edt_conf_cec_button_release_delay_ms_title": "Button release time",
|
||||
"edt_conf_cec_button_release_delay_ms_expl": "Remote button press release time",
|
||||
"edt_conf_cec_button_repeat_rate_ms_title": "Button repeat rate",
|
||||
"edt_conf_cec_button_repeat_rate_ms_expl": "Remote button press repeat rate",
|
||||
"edt_conf_cec_double_tap_timeout_ms_title": "Button delay before repeating",
|
||||
"edt_conf_cec_double_tap_timeout_ms_expl": "Remote button press delay before repeating",
|
||||
"edt_conf_cec_event_title": "CEC Event",
|
||||
"edt_conf_cec_event_expl": "CEC event that will trigger an action",
|
||||
"edt_conf_color_accuracyLevel_expl": "Level how accurate dominat colors are evaluated. A higher level creates more accurate results, but also requries more processing power. Should to be combined with reduced pixel processing.",
|
||||
"edt_conf_color_accuracyLevel_title": "Accuracy level",
|
||||
"edt_conf_color_backlightColored_expl": "Add some color to your backlight.",
|
||||
@@ -320,6 +361,13 @@
|
||||
"edt_conf_enum_HORIZONTAL": "Horizontal",
|
||||
"edt_conf_enum_VERTICAL": "Vertical",
|
||||
"edt_conf_enum_BOTH": "Horizontal & Vertical",
|
||||
"edt_conf_enum_action_idle": "Idle",
|
||||
"edt_conf_enum_action_restart": "Restart",
|
||||
"edt_conf_enum_action_resume": "Resume",
|
||||
"edt_conf_enum_action_resumeIdle": "ResumeIdle",
|
||||
"edt_conf_enum_action_suspend": "Suspend",
|
||||
"edt_conf_enum_action_toggleIdle": "ToggleIdle",
|
||||
"edt_conf_enum_action_toggleSuspend": "ToggleSuspend",
|
||||
"edt_conf_enum_automatic": "Automatic",
|
||||
"edt_conf_enum_bbclassic": "Classic",
|
||||
"edt_conf_enum_bbdefault": "Default",
|
||||
@@ -328,6 +376,12 @@
|
||||
"edt_conf_enum_bgr": "BGR",
|
||||
"edt_conf_enum_bottom_up": "Bottom up",
|
||||
"edt_conf_enum_brg": "BRG",
|
||||
"edt_conf_enum_cec_key_f1_blue": "Blue button pressed",
|
||||
"edt_conf_enum_cec_key_f2_red": "Red button pressed",
|
||||
"edt_conf_enum_cec_key_f3_green": "Green button pressed",
|
||||
"edt_conf_enum_cec_key_f4_yellow": "Yellow button pressed",
|
||||
"edt_conf_enum_cec_opcode_set stream path": "TV on",
|
||||
"edt_conf_enum_cec_opcode_standby": "TV off",
|
||||
"edt_conf_enum_color": "Color",
|
||||
"edt_conf_enum_custom": "Custom",
|
||||
"edt_conf_enum_decay": "Decay",
|
||||
@@ -455,9 +509,18 @@
|
||||
"edt_conf_net_localApiAuth_title": "Local API Authentication",
|
||||
"edt_conf_net_restirctedInternetAccessAPI_expl": "You can restrict the access to the API through the internet to certain IP's.",
|
||||
"edt_conf_net_restirctedInternetAccessAPI_title": "Restrict to IP's",
|
||||
"edt_conf_os_events_lockEnable_title": "Listen to lock events",
|
||||
"edt_conf_os_events_lockEnable_expl": "Listen to screen lock/unlock events",
|
||||
"edt_conf_os_events_suspendEnable_title": "Listen to suspend events",
|
||||
"edt_conf_os_events_suspendEnable_expl": "Listen to operating system suspend/resume events",
|
||||
"edt_conf_os_events_suspendOnLockEnable_title": "Suspend when locked",
|
||||
"edt_conf_os_events_suspendOnLockEnable_expl": "Suspend when the screen is locked, otherwise go into idle mode",
|
||||
"edt_conf_pbs_heading_title": "Protocol Buffers Server",
|
||||
"edt_conf_pbs_timeout_expl": "If no data are received for the given period, the component will be (soft) disabled.",
|
||||
"edt_conf_pbs_timeout_title": "Timeout",
|
||||
"edt_conf_sched_actions_header_title": "Actions",
|
||||
"edt_conf_sched_actions_header_expl": "Define which action should take place on a point in time. The action will be scheduled daily.",
|
||||
"edt_conf_sched_actions_header_item_title": "Action",
|
||||
"edt_conf_smooth_continuousOutput_expl": "Update the LEDs even there is no changed picture.",
|
||||
"edt_conf_smooth_continuousOutput_title": "Continuous output",
|
||||
"edt_conf_smooth_decay_expl": "The speed of decay. 1 is linear, greater values are have stronger effect.",
|
||||
@@ -475,6 +538,8 @@
|
||||
"edt_conf_smooth_updateDelay_title": "Output delay",
|
||||
"edt_conf_smooth_updateFrequency_expl": "The output speed to your LED controller.",
|
||||
"edt_conf_smooth_updateFrequency_title": "Update frequency",
|
||||
"edt_conf_time_event_title": "Time",
|
||||
"edt_conf_time_event_expl": "Point in time that will trigger an action",
|
||||
"edt_conf_v4l2_blueSignalThreshold_expl": "Darkens low blue values (recognized as black)",
|
||||
"edt_conf_v4l2_blueSignalThreshold_title": "Blue signal threshold",
|
||||
"edt_conf_v4l2_cecDetection_expl": "If enabled, USB capture will be temporarily disabled when CEC standby event received from HDMI bus.",
|
||||
@@ -534,27 +599,6 @@
|
||||
"edt_conf_v4l2_hardware_set_defaults_tip": "Set device's default values for brightness, contrast, hue and saturation",
|
||||
"edt_conf_v4l2_noSignalCounterThreshold_title": "Signal Counter Threshold",
|
||||
"edt_conf_v4l2_noSignalCounterThreshold_expl": "Count of frames (check that with grabber's current FPS mode) after which the no signal is triggered",
|
||||
"edt_conf_audio_device_expl": "Selected audio input device",
|
||||
"edt_conf_audio_device_title": "Audio Device",
|
||||
"edt_conf_audio_effects_expl": "Select an effect on how the audio signal is transformed to",
|
||||
"edt_conf_audio_effects_title": "Audio Effects",
|
||||
"edt_conf_audio_effect_enum_vumeter": "VU-Meter",
|
||||
"edt_conf_audio_effect_hotcolor_expl": "Hot Color",
|
||||
"edt_conf_audio_effect_hotcolor_title": "Hot Color",
|
||||
"edt_conf_audio_effect_multiplier_expl": "Audio Signal Value multiplier",
|
||||
"edt_conf_audio_effect_multiplier_title": "Multiplier",
|
||||
"edt_conf_audio_effect_safecolor_expl": "Safe Color",
|
||||
"edt_conf_audio_effect_safecolor_title": "Safe Color",
|
||||
"edt_conf_audio_effect_safevalue_expl": "Safe Threshold",
|
||||
"edt_conf_audio_effect_safevalue_title": "Safe Threshold",
|
||||
"edt_conf_audio_effect_set_defaults": "Reset to default values",
|
||||
"edt_conf_audio_effect_tolerance_expl": "Tolerance used when auto calculating a signal multipler from 0-100",
|
||||
"edt_conf_audio_effect_tolerance_title": "Tolerance",
|
||||
"edt_conf_audio_effect_warncolor_expl": "Warning Color",
|
||||
"edt_conf_audio_effect_warncolor_title": "Warning Color",
|
||||
"edt_conf_audio_effect_warnvalue_expl": "Warning Threshold",
|
||||
"edt_conf_audio_effect_warnvalue_title": "Warning Threshold",
|
||||
"edt_conf_audio_heading_title": "Audio Capture",
|
||||
"edt_conf_webc_crtPath_expl": "Path to the certification file (format should be PEM)",
|
||||
"edt_conf_webc_crtPath_title": "Certificate path",
|
||||
"edt_conf_webc_docroot_expl": "Local webinterface root path (just for webui developer)",
|
||||
@@ -983,6 +1027,8 @@
|
||||
"main_menu_dashboard_token": "Dashboard",
|
||||
"main_menu_effect_conf_token": "Effects",
|
||||
"main_menu_effectsconfigurator_token": "Effects Configurator",
|
||||
"main_menu_events": "Event Services",
|
||||
"main_menu_event_services_token": "Event Services",
|
||||
"main_menu_general_conf_token": "General",
|
||||
"main_menu_grabber_conf_token": "Capturing Hardware",
|
||||
"main_menu_input_selection_token": "Input Selection",
|
||||
|
@@ -280,6 +280,7 @@
|
||||
<li>
|
||||
<a class="inactive"><i class="fa fa-industry fa-fw"></i><span data-i18n="main_menu_system_token">System</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li> <a class="inactive mnava" id="MenuItemEventServices" href="#conf_events"><i class="fa fa-server fa-fw"></i><span data-i18n="main_menu_event_services_token">Event Services</span></a> </li>
|
||||
<li> <a class="inactive mnava" id="MenuItemWeb" href="#conf_webconfig" id="load_webconfig"><i class="fa fa-wrench fa-fw"></i><span data-i18n="main_menu_webconfig_token">Webconfiguration</span></a> </li>
|
||||
<li> <a class="inactive mnava" id="MenuItemLogging" href="#conf_logging"><i class="fa fa-reorder fa-fw"></i><span data-i18n="main_menu_logging_token">Log</span></a> </li>
|
||||
<li> <a class="inactive mnava" href="#update"><i class="fa fa-download fa-fw"></i><span data-i18n="main_menu_update_token">Update</span></a> </li>
|
||||
|
157
assets/webconfig/js/content_events.js
Normal file
157
assets/webconfig/js/content_events.js
Normal file
@@ -0,0 +1,157 @@
|
||||
$(document).ready(function () {
|
||||
performTranslation();
|
||||
|
||||
const CEC_ENABLED = (jQuery.inArray("cec", window.serverInfo.services) !== -1);
|
||||
|
||||
let conf_editor_osEvents = null;
|
||||
let conf_editor_cecEvents = null;
|
||||
let conf_editor_schedEvents = null;
|
||||
|
||||
if (window.showOptHelp) {
|
||||
//Operating System Events
|
||||
$('#conf_cont').append(createRow('conf_cont_os_events'));
|
||||
$('#conf_cont_os_events').append(createOptPanel('fa-laptop', $.i18n("conf_os_events_heading_title"), 'editor_container_os_events', 'btn_submit_os_events', 'panel-system'));
|
||||
$('#conf_cont_os_events').append(createHelpTable(window.schema.osEvents.properties, $.i18n("conf_os_events_heading_title")));
|
||||
|
||||
//Scheduled Events
|
||||
$('#conf_cont').append(createRow('conf_cont_sched_events'));
|
||||
$('#conf_cont_sched_events').append(createOptPanel('fa-laptop', $.i18n("conf_sched_events_heading_title"), 'editor_container_sched_events', 'btn_submit_sched_events', 'panel-system'));
|
||||
$('#conf_cont_sched_events').append(createHelpTable(window.schema.schedEvents.properties, $.i18n("conf_sched_events_heading_title")));
|
||||
|
||||
|
||||
//CEC Events
|
||||
if (CEC_ENABLED) {
|
||||
$('#conf_cont').append(createRow('conf_cont_event_cec'));
|
||||
$('#conf_cont_event_cec').append(createOptPanel('fa-tv', $.i18n("conf_cec_events_heading_title"), 'editor_container_cec_events', 'btn_submit_cec_events', 'panel-system'));
|
||||
$('#conf_cont_event_cec').append(createHelpTable(window.schema.cecEvents.properties, $.i18n("conf_cec_events_heading_title"), "cecEventsHelpPanelId"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$('#conf_cont').addClass('row');
|
||||
$('#conf_cont').append(createOptPanel('fa-laptop', $.i18n("conf_os_events_heading_title"), 'editor_container_os_events', 'btn_submit_os_events'));
|
||||
$('#conf_cont').append(createOptPanel('fa-laptop', $.i18n("conf_sched_events_heading_title"), 'editor_container_sched_events', 'btn_submit_sched_events'));
|
||||
if (CEC_ENABLED) {
|
||||
$('#conf_cont').append(createOptPanel('fa-tv', $.i18n("conf_cec_events_heading_title"), 'editor_container_cec_events', 'btn_submit_cec_events'));
|
||||
}
|
||||
}
|
||||
|
||||
function findDuplicateEventsIndices(data) {
|
||||
const eventIndices = {};
|
||||
data.forEach((item, index) => {
|
||||
const event = item.event;
|
||||
if (!eventIndices[event]) {
|
||||
eventIndices[event] = [index];
|
||||
} else {
|
||||
eventIndices[event].push(index);
|
||||
}
|
||||
});
|
||||
|
||||
return Object.values(eventIndices).filter(indices => indices.length > 1);
|
||||
}
|
||||
|
||||
JSONEditor.defaults.custom_validators.push(function (schema, value, path) {
|
||||
let errors = [];
|
||||
if (schema.type === 'array' && Array.isArray(value)) {
|
||||
const duplicateEventIndices = findDuplicateEventsIndices(value);
|
||||
|
||||
if (duplicateEventIndices.length > 0) {
|
||||
|
||||
let recs;
|
||||
duplicateEventIndices.forEach(indices => {
|
||||
const displayIndices = indices.map(index => index + 1);
|
||||
recs = displayIndices.join(', ');
|
||||
});
|
||||
|
||||
errors.push({
|
||||
path: path,
|
||||
message: $.i18n('edt_conf_action_record_validation_error', recs)
|
||||
});
|
||||
}
|
||||
}
|
||||
return errors;
|
||||
});
|
||||
|
||||
//Operating System Events
|
||||
conf_editor_osEvents = createJsonEditor('editor_container_os_events', {
|
||||
osEvents: window.schema.osEvents
|
||||
}, true, true);
|
||||
|
||||
conf_editor_osEvents.on('change', function () {
|
||||
conf_editor_osEvents.validate().length || window.readOnlyMode ? $('#btn_submit_os_events').prop('disabled', true) : $('#btn_submit_os_events').prop('disabled', false);
|
||||
});
|
||||
|
||||
$('#btn_submit_os_events').off().on('click', function () {
|
||||
requestWriteConfig(conf_editor_osEvents.getValue());
|
||||
});
|
||||
|
||||
//Scheduled Events
|
||||
conf_editor_schedEvents = createJsonEditor('editor_container_sched_events', {
|
||||
schedEvents: window.schema.schedEvents
|
||||
}, true, true);
|
||||
|
||||
conf_editor_schedEvents.on('change', function () {
|
||||
|
||||
const schedEventsEnable = conf_editor_schedEvents.getEditor("root.schedEvents.enable").getValue();
|
||||
|
||||
if (schedEventsEnable) {
|
||||
showInputOptionsForKey(conf_editor_schedEvents, "schedEvents", "enable", true);
|
||||
$('#schedEventsHelpPanelId').show();
|
||||
} else {
|
||||
showInputOptionsForKey(conf_editor_schedEvents, "schedEvents", "enable", false);
|
||||
$('#schedEventsHelpPanelId').hide();
|
||||
}
|
||||
|
||||
conf_editor_schedEvents.validate().length || window.readOnlyMode ? $('#btn_submit_sched_events').prop('disabled', true) : $('#btn_submit_sched_events').prop('disabled', false);
|
||||
});
|
||||
|
||||
$('#btn_submit_sched_events').off().on('click', function () {
|
||||
|
||||
const saveOptions = conf_editor_schedEvents.getValue();
|
||||
// Workaround, as otherwise values are not reflected correctly
|
||||
saveOptions.schedEvents.enable = conf_editor_schedEvents.getEditor("root.schedEvents.enable").getValue();
|
||||
saveOptions.schedEvents.actions = conf_editor_schedEvents.getEditor("root.schedEvents.actions").getValue();
|
||||
requestWriteConfig(saveOptions);
|
||||
});
|
||||
|
||||
//CEC Events
|
||||
if (CEC_ENABLED) {
|
||||
conf_editor_cecEvents = createJsonEditor('editor_container_cec_events', {
|
||||
cecEvents: window.schema.cecEvents
|
||||
}, true, true);
|
||||
|
||||
conf_editor_cecEvents.on('change', function () {
|
||||
|
||||
const cecEventsEnable = conf_editor_cecEvents.getEditor("root.cecEvents.enable").getValue();
|
||||
|
||||
if (cecEventsEnable) {
|
||||
showInputOptionsForKey(conf_editor_cecEvents, "cecEvents", "enable", true);
|
||||
$('#cecEventsHelpPanelId').show();
|
||||
} else {
|
||||
showInputOptionsForKey(conf_editor_cecEvents, "cecEvents", "enable", false);
|
||||
$('#cecEventsHelpPanelId').hide();
|
||||
}
|
||||
|
||||
conf_editor_cecEvents.validate().length || window.readOnlyMode ? $('#btn_submit_cec_events').prop('disabled', true) : $('#btn_submit_cec_events').prop('disabled', false);
|
||||
});
|
||||
|
||||
$('#btn_submit_cec_events').off().on('click', function () {
|
||||
|
||||
const saveOptions = conf_editor_cecEvents.getValue();
|
||||
// Workaround, as otherwise values are not reflected correctly
|
||||
saveOptions.cecEvents.enable = conf_editor_cecEvents.getEditor("root.cecEvents.enable").getValue();
|
||||
saveOptions.cecEvents.actions = conf_editor_cecEvents.getEditor("root.cecEvents.actions").getValue();
|
||||
requestWriteConfig(saveOptions);
|
||||
});
|
||||
}
|
||||
|
||||
//create introduction
|
||||
if (window.showOptHelp) {
|
||||
createHint("intro", $.i18n('conf_os_events_intro'), "editor_container_os_events");
|
||||
if (CEC_ENABLED) {
|
||||
createHint("intro", $.i18n('conf_cec_events_intro'), "editor_container_cec_events");
|
||||
}
|
||||
}
|
||||
|
||||
removeOverlay();
|
||||
});
|
||||
|
@@ -5,7 +5,6 @@ $(document).ready(function () {
|
||||
var screenGrabberAvailable = (window.serverInfo.grabbers.screen.available.length !== 0);
|
||||
var videoGrabberAvailable = (window.serverInfo.grabbers.video.available.length !== 0);
|
||||
const audioGrabberAvailable = (window.serverInfo.grabbers.audio.available.length !== 0);
|
||||
var CEC_ENABLED = (jQuery.inArray("cec", window.serverInfo.services) !== -1);
|
||||
|
||||
var conf_editor_video = null;
|
||||
var conf_editor_audio = null;
|
||||
@@ -369,11 +368,6 @@ $(document).ready(function () {
|
||||
|
||||
conf_editor_video.on('change', function () {
|
||||
|
||||
// Hide elements not supported by the backend
|
||||
if (window.serverInfo.cec.enabled === false || !CEC_ENABLED) {
|
||||
showInputOptionForItem(conf_editor_video, "grabberV4L2", "cecDetection", false);
|
||||
}
|
||||
|
||||
// Validate the current editor's content
|
||||
if (!conf_editor_video.validate().length) {
|
||||
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
||||
|
Reference in New Issue
Block a user