mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #6142 from gnattu/only-add-node-when-enabled-normalization
This commit is contained in:
commit
ef7642a369
2 changed files with 10 additions and 4 deletions
|
@ -121,6 +121,14 @@ class HtmlAudioPlayer {
|
||||||
normalizationGain =
|
normalizationGain =
|
||||||
options.mediaSource.albumNormalizationGain
|
options.mediaSource.albumNormalizationGain
|
||||||
?? options.item.NormalizationGain;
|
?? options.item.NormalizationGain;
|
||||||
|
} else {
|
||||||
|
console.debug('normalization disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!self.gainNode) {
|
||||||
|
addGainElement(elem);
|
||||||
|
if (!self.gainNode) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (normalizationGain) {
|
if (normalizationGain) {
|
||||||
|
@ -276,8 +284,6 @@ class HtmlAudioPlayer {
|
||||||
|
|
||||||
self._mediaElement = elem;
|
self._mediaElement = elem;
|
||||||
|
|
||||||
addGainElement(elem);
|
|
||||||
|
|
||||||
return elem;
|
return elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +323,7 @@ class HtmlAudioPlayer {
|
||||||
function onVolumeChange() {
|
function onVolumeChange() {
|
||||||
if (!self._isFadingOut) {
|
if (!self._isFadingOut) {
|
||||||
htmlMediaHelper.saveVolume(this.volume);
|
htmlMediaHelper.saveVolume(this.volume);
|
||||||
if (browser.safari) {
|
if (browser.safari && self.gainNode) {
|
||||||
self.gainNode.gain.value = this.volume * self.normalizationGain;
|
self.gainNode.gain.value = this.volume * self.normalizationGain;
|
||||||
}
|
}
|
||||||
Events.trigger(self, 'volumechange');
|
Events.trigger(self, 'volumechange');
|
||||||
|
|
|
@ -156,7 +156,7 @@
|
||||||
"ChannelNumber": "Channel number",
|
"ChannelNumber": "Channel number",
|
||||||
"Channels": "Channels",
|
"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.",
|
"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",
|
"ClearQueue": "Clear queue",
|
||||||
"ClientSettings": "Client Settings",
|
"ClientSettings": "Client Settings",
|
||||||
"Collections": "Collections",
|
"Collections": "Collections",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue