Backport pull request #5920 from jellyfin-web/release-10.9.z
Fix Safari volume control Original-merge: 90236c25ee1b0bbad5723c15264d3a8d6a3479db Merged-by: thornbill <thornbill@users.noreply.github.com> Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
9a3cba06d1
commit
cceb1a5935
@@ -125,8 +125,10 @@ class HtmlAudioPlayer {
|
||||
|
||||
if (normalizationGain) {
|
||||
self.gainNode.gain.value = Math.pow(10, normalizationGain / 20);
|
||||
self.normalizationGain = self.gainNode.gain.value;
|
||||
} else {
|
||||
self.gainNode.gain.value = 1;
|
||||
self.normalizationGain = 1;
|
||||
}
|
||||
console.debug('gain: ' + self.gainNode.gain.value);
|
||||
}).catch((err) => {
|
||||
@@ -311,6 +313,9 @@ class HtmlAudioPlayer {
|
||||
function onVolumeChange() {
|
||||
if (!self._isFadingOut) {
|
||||
htmlMediaHelper.saveVolume(this.volume);
|
||||
if (browser.safari) {
|
||||
self.gainNode.gain.value = this.volume * self.normalizationGain;
|
||||
}
|
||||
Events.trigger(self, 'volumechange');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user