mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add catch if LFUS is null
This commit is contained in:
parent
ba6db57913
commit
31a957af24
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ class HtmlAudioPlayer {
|
||||||
let val = options.url;
|
let val = options.url;
|
||||||
console.debug('playing url: ' + val);
|
console.debug('playing url: ' + val);
|
||||||
import('../../scripts/settings/userSettings').then((userSettings)=> {
|
import('../../scripts/settings/userSettings').then((userSettings)=> {
|
||||||
if (userSettings.enableAudioNormalization()) {
|
if (userSettings.enableAudioNormalization() && options.item.LUFS != null) {
|
||||||
const dbGain = -18 - options.item.LUFS;
|
const dbGain = -18 - options.item.LUFS;
|
||||||
self.gainNode.gain.value = Math.pow(10, (dbGain / 20));
|
self.gainNode.gain.value = Math.pow(10, (dbGain / 20));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue