From b8e7df198d5eabbf8c0d82f4aee86a38168d8d71 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 20 Feb 2020 06:08:49 +0900 Subject: Improve sound --- src/client/components/timeline.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/client/components') diff --git a/src/client/components/timeline.vue b/src/client/components/timeline.vue index 6befd7c2a7..234ed6b07c 100644 --- a/src/client/components/timeline.vue +++ b/src/client/components/timeline.vue @@ -53,11 +53,7 @@ export default Vue.extend({ (this.$refs.tl as any).prepend(note); if (this.sound) { - const audio = new Audio(note.userId === this.$store.state.i.id - ? `/assets/sounds/${this.$store.state.device.sfxNoteMy}.mp3` - : `/assets/sounds/${this.$store.state.device.sfxNote}.mp3`); - audio.volume = this.$store.state.device.sfxVolume; - audio.play(); + this.$root.sound(note.userId === this.$store.state.i.id ? 'noteMy' : 'note'); } }; -- cgit v1.2.3-freya