Better sfx

This commit is contained in:
syuilo 2020-02-20 03:14:17 +09:00
parent e7205d9cc2
commit 880cea5a56
9 changed files with 20 additions and 4 deletions

View file

@ -53,7 +53,9 @@ export default Vue.extend({
(this.$refs.tl as any).prepend(note);
if (this.sound) {
const audio = new Audio(`/assets/sounds/${this.$store.state.device.sfxNote}.mp3`);
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();
}