mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-18 11:35:15 -04:00
Apply suggestion from @Copilot
We check for the file's existence, and if it does, we set AUDIO_MOTION_ENABLED = true. Okay, let's do an additional check in case the import fails for some reason. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -22,6 +22,9 @@ if (checkAudioMotionEnabled()) {
|
||||
if (currentView == 'watch' || currentView == 'montage' || currentView == 'event') {
|
||||
customElements.define('audio-motion', _AudioMotionAnalyzer);
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('Failed to load audioMotion-analyzer module:', error);
|
||||
window.CURRENT_AUDIO_MOTION_ANALYZER_VERSION = "LoadFailed";
|
||||
});
|
||||
} else {
|
||||
window.CURRENT_AUDIO_MOTION_ANALYZER_VERSION = "NotInstalled";
|
||||
|
||||
Reference in New Issue
Block a user