Revert "Revert "Volume customization""

This reverts commit c8fa684ab7.
This commit is contained in:
Maikiwi 2022-01-22 20:55:59 -08:00
parent c8fa684ab7
commit c3c3773637
5 changed files with 11 additions and 11 deletions

View file

@ -3007,17 +3007,17 @@ const app = new Vue({
},
volumeWheel(event) {
if (event.deltaY < 0) {
if (this.mk.volume < 1) {
if (this.mk.volume <= 0.9) {
this.mk.volume += 0.1
if (this.mk.volume < 0.2) {
if (this.mk.volume <= 0.19) {
this.mk.volume += 0.01
} else {
this.mk.volume = 1
this.mk.volume = 0.2
}
}
} else if (event.deltaY > 0) {
if (this.mk.volume > 0) {
if (this.mk.volume >= 0.1) {
this.mk.volume -= 0.1
if (this.mk.volume >= 0.01) {
this.mk.volume -= 0.01
} else {
this.mk.volume = 0
}

View file

@ -82,7 +82,7 @@
</div>
<div class="app-chrome--right">
<div class="app-chrome-item volume display--large">
<input type="range" class="" step="0.01" min="0" max="1" v-model="mk.volume"
<input type="range" class="" step="0.01" min="0" max="0.2" v-model="mk.volume"
v-if="typeof mk.volume != 'undefined'">
</div>
<div class="app-chrome-item generic">

View file

@ -80,7 +80,7 @@
<div class="app-chrome-item volume display--large">
<div class="input-container">
<button class="volume-button--small volume" @click="app.muteButtonPressed()" :class="{'active': app.cfg.audio.volume == 0}"></button>
<input type="range" class="slider" @wheel="app.volumeWheel" step="0.01" min="0" max="1" v-model="app.mk.volume"
<input type="range" class="slider" @wheel="app.volumeWheel" step="0.01" min="0" max="0,2" v-model="app.mk.volume"
v-if="typeof app.mk.volume != 'undefined'" @change="app.checkMuteChange()">
</div>
</div>

View file

@ -142,7 +142,7 @@
<div class="app-chrome-item volume display--large">
<button class="volume-button--small volume" @click="muteButtonPressed()"
:class="{'active': this.cfg.audio.volume == 0}"></button>
<input type="range" class="" @wheel="volumeWheel" step="0.01" min="0" max="1"
<input type="range" class="" @wheel="volumeWheel" step="0.01" min="0" max="0.2"
v-model="mk.volume" v-if="typeof mk.volume != 'undefined'" @change="checkMuteChange()">
</div>
<div class="app-chrome-item generic" v-if="false">
@ -316,7 +316,7 @@
<div class="input-container">
<button class="volume-button--small volume" @click="muteButtonPressed()"
:class="{'active': this.cfg.audio.volume == 0}"></button>
<input type="range" class="" @wheel="volumeWheel" step="0.01" min="0" max="1"
<input type="range" class="" @wheel="volumeWheel" step="0.01" min="0" max="0.2"
v-model="mk.volume" v-if="typeof mk.volume != 'undefined'"
@change="checkMuteChange()">
</div>

View file

@ -173,7 +173,7 @@
<div class="player-volume-glyph decrease"></div>
</div>
<div class="col">
<input type="range" class="web-slider volume-slider" max="1" min="0" step="0.01"
<input type="range" class="web-slider volume-slider" max="0.2" min="0" step="0.01"
@input="setVolume($event.target.value)" :value="player.currentMediaItem.volume">
</div>
<div class="col-auto">