add volume setting

This commit is contained in:
Zutatensuppe 2021-06-06 17:05:10 +02:00
parent d9ab766e18
commit 0882d3befd
8 changed files with 71 additions and 6 deletions

View file

@ -77,6 +77,7 @@ export default defineComponent({
color: '',
name: '',
soundsEnabled: false,
soundsVolume: 100,
},
previewImageUrl: '',
setHotkeys: (v: boolean) => {},
@ -84,6 +85,7 @@ export default defineComponent({
onColorChange: (v: string) => {},
onNameChange: (v: string) => {},
onSoundsEnabledChange: (v: boolean) => {},
onSoundsVolumeChange: (v: number) => {},
replayOnSpeedUp: () => {},
replayOnSpeedDown: () => {},
replayOnPauseToggle: () => {},
@ -115,6 +117,9 @@ export default defineComponent({
this.$watch(() => this.g.player.soundsEnabled, (value: boolean) => {
this.g.onSoundsEnabledChange(value)
})
this.$watch(() => this.g.player.soundsVolume, (value: number) => {
this.g.onSoundsVolumeChange(value)
})
this.g = await main(
`${this.$route.params.id}`,
// @ts-ignore