summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-02-20 23:17:17 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-02-20 23:17:17 +0900
commit49c2a9b372421d2f8183a9ea53c0b2136a8e08ed (patch)
treed4e8a9ab322b57f65200e6966a2311bee815063d /src
parentFix bug (diff)
downloadsharkey-49c2a9b372421d2f8183a9ea53c0b2136a8e08ed.tar.gz
sharkey-49c2a9b372421d2f8183a9ea53c0b2136a8e08ed.tar.bz2
sharkey-49c2a9b372421d2f8183a9ea53c0b2136a8e08ed.zip
ボリュームが0のときサウンドを鳴らさないように
Diffstat (limited to 'src')
-rw-r--r--src/client/init.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client/init.ts b/src/client/init.ts
index d333a1289f..b65eba7c0b 100644
--- a/src/client/init.ts
+++ b/src/client/init.ts
@@ -190,6 +190,7 @@ os.init(async () => {
(vm as any).focus();
},
sound(type: string) {
+ if (this.$store.state.device.sfxVolume === 0) return;
const sound = this.$store.state.device['sfx' + type.substr(0, 1).toUpperCase() + type.substr(1)];
if (sound == null) return;
const audio = new Audio(`/assets/sounds/${sound}.mp3`);