mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #5920 from gnattu/fix-safari-volume-10.9
This commit is contained in:
commit
90236c25ee
2 changed files with 6 additions and 1 deletions
|
@ -242,7 +242,7 @@ const supportedFeatures = function () {
|
|||
features.push('fullscreenchange');
|
||||
}
|
||||
|
||||
if (browser.tv || browser.xboxOne || browser.ps4 || browser.mobile) {
|
||||
if (browser.tv || browser.xboxOne || browser.ps4 || browser.mobile || browser.ipad) {
|
||||
features.push('physicalvolumecontrol');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue