Enable stepless adjustment of the volume control slider

This commit is contained in:
Tony Wasserka 2021-09-10 19:03:32 +00:00 committed by Georg Krause
parent ee4d0928e4
commit 6114853445
2 changed files with 6 additions and 4 deletions

View File

@ -0,0 +1 @@
Enable stepless adjustment of the volume slider (!1294)

View File

@ -29,9 +29,9 @@
<input
id="volume-slider"
type="range"
step="0.02"
step="any"
min="0"
max="1"
v-bind:max="volumeSteps"
v-model="sliderVolume" />
</div>
</button>
@ -44,15 +44,16 @@ export default {
return {
expanded: false,
timeout: null,
volumeSteps: 100,
}
},
computed: {
sliderVolume: {
get () {
return this.$store.state.player.volume
return this.$store.state.player.volume * this.volumeSteps;
},
set (v) {
this.$store.commit("player/volume", v)
this.$store.commit("player/volume", v / this.volumeSteps)
}
},
labels () {