1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #2837 from keegandahm/keegandahm/log-volume-slider

This commit is contained in:
Bill Thornton 2021-08-12 16:50:41 -07:00 committed by GitHub
commit a8041138d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -46,6 +46,7 @@
- [danieladov](https://github.com/danieladov)
- [Stephane Senart](https://github.com/ssenart)
- [Ömer Erdinç Yağmurlu](https://github.com/omeryagmurlu)
- [Keegan Dahm](https://github.com/keegandahm)
# Emby Contributors

View file

@ -457,14 +457,14 @@ class HtmlAudioPlayer {
setVolume(val) {
const mediaElement = this._mediaElement;
if (mediaElement) {
mediaElement.volume = val / 100;
mediaElement.volume = Math.pow(val / 100, 3);
}
}
getVolume() {
const mediaElement = this._mediaElement;
if (mediaElement) {
return Math.min(Math.round(mediaElement.volume * 100), 100);
return Math.min(Math.round(Math.pow(mediaElement.volume, 1 / 3) * 100), 100);
}
}

View file

@ -1708,14 +1708,14 @@ function tryRemoveElement(elem) {
setVolume(val) {
const mediaElement = this.#mediaElement;
if (mediaElement) {
mediaElement.volume = val / 100;
mediaElement.volume = Math.pow(val / 100, 3);
}
}
getVolume() {
const mediaElement = this.#mediaElement;
if (mediaElement) {
return Math.min(Math.round(mediaElement.volume * 100), 100);
return Math.min(Math.round(Math.pow(mediaElement.volume, 1 / 3) * 100), 100);
}
}