mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-10-06 19:03:26 +00:00
Only add gain node when normalization enabled
This commit is contained in:
parent
aac5fe2f49
commit
0dbde71241
@ -121,6 +121,13 @@ class HtmlAudioPlayer {
|
||||
normalizationGain =
|
||||
options.mediaSource.albumNormalizationGain
|
||||
?? options.item.NormalizationGain;
|
||||
} else {
|
||||
console.debug('normalization disabled')
|
||||
return;
|
||||
}
|
||||
|
||||
if (!self.gainNode) {
|
||||
addGainElement(elem);
|
||||
}
|
||||
|
||||
if (normalizationGain) {
|
||||
@ -276,7 +283,7 @@ class HtmlAudioPlayer {
|
||||
|
||||
self._mediaElement = elem;
|
||||
|
||||
addGainElement(elem);
|
||||
// addGainElement(elem);
|
||||
|
||||
return elem;
|
||||
}
|
||||
@ -317,7 +324,7 @@ class HtmlAudioPlayer {
|
||||
function onVolumeChange() {
|
||||
if (!self._isFadingOut) {
|
||||
htmlMediaHelper.saveVolume(this.volume);
|
||||
if (browser.safari) {
|
||||
if (browser.safari && self.gainNode) {
|
||||
self.gainNode.gain.value = this.volume * self.normalizationGain;
|
||||
}
|
||||
Events.trigger(self, 'volumechange');
|
||||
|
@ -156,7 +156,7 @@
|
||||
"ChannelNumber": "Channel number",
|
||||
"Channels": "Channels",
|
||||
"CinemaModeConfigurationHelp": "Cinema mode brings the theater experience straight to your living room with the ability to play trailers and custom intros before the main feature.",
|
||||
"SelectAudioNormalizationHelp": "Track gain - adjusts the volume of each track so they playback with the same loudness. Album gain - adjusts the volume of all the tracks in an album only, keeping the album's dynamic range.",
|
||||
"SelectAudioNormalizationHelp": "Track gain - adjusts the volume of each track so they playback with the same loudness. Album gain - adjusts the volume of all the tracks in an album only, keeping the album's dynamic range. Switching between \"Off\" and other options requires restarting the current playback.",
|
||||
"ClearQueue": "Clear queue",
|
||||
"ClientSettings": "Client Settings",
|
||||
"Collections": "Collections",
|
||||
|
Loading…
Reference in New Issue
Block a user