From 49c2a9b372421d2f8183a9ea53c0b2136a8e08ed Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 20 Feb 2020 23:17:17 +0900 Subject: ボリュームが0のときサウンドを鳴らさないように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/init.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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`); -- cgit v1.2.3-freya