Add catch if LFUS is null

This commit is contained in:
TelepathicWalrus 2023-02-02 14:08:37 +00:00
parent ba6db57913
commit 31a957af24

View file

@ -108,7 +108,7 @@ class HtmlAudioPlayer {
let val = options.url;
console.debug('playing url: ' + val);
import('../../scripts/settings/userSettings').then((userSettings)=> {
if (userSettings.enableAudioNormalization()) {
if (userSettings.enableAudioNormalization() && options.item.LUFS != null) {
const dbGain = -18 - options.item.LUFS;
self.gainNode.gain.value = Math.pow(10, (dbGain / 20));
} else {