summaryrefslogtreecommitdiff
path: root/packages/frontend/src/widgets/WidgetJobQueue.vue
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2023-11-26 14:38:34 +0900
committerGitHub <noreply@github.com>2023-11-26 14:38:34 +0900
commitccb951f11e8cc3c884eef799bef82d09f138d28c (patch)
tree042b72a29952413865649db553753931791ac785 /packages/frontend/src/widgets/WidgetJobQueue.vue
parentfix(frontend): 通知音がほぼ同時に鳴った場合は再生をブロ... (diff)
downloadsharkey-ccb951f11e8cc3c884eef799bef82d09f138d28c.tar.gz
sharkey-ccb951f11e8cc3c884eef799bef82d09f138d28c.tar.bz2
sharkey-ccb951f11e8cc3c884eef799bef82d09f138d28c.zip
chore: create AudioContext when it is needed (#12460)
Diffstat (limited to 'packages/frontend/src/widgets/WidgetJobQueue.vue')
-rw-r--r--packages/frontend/src/widgets/WidgetJobQueue.vue5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/frontend/src/widgets/WidgetJobQueue.vue b/packages/frontend/src/widgets/WidgetJobQueue.vue
index fa82997570..8c990e8e49 100644
--- a/packages/frontend/src/widgets/WidgetJobQueue.vue
+++ b/packages/frontend/src/widgets/WidgetJobQueue.vue
@@ -58,6 +58,7 @@ import { useStream } from '@/stream.js';
import number from '@/filters/number.js';
import * as sound from '@/scripts/sound.js';
import { deepClone } from '@/scripts/clone.js';
+import { defaultStore } from '@/store.js';
const name = 'jobQueue';
@@ -102,7 +103,9 @@ const prev = reactive({} as typeof current);
let jammedAudioBuffer: AudioBuffer | null = $ref(null);
let jammedSoundNodePlaying: boolean = $ref(false);
-sound.loadAudio('syuilo/queue-jammed').then(buf => jammedAudioBuffer = buf);
+if (defaultStore.state.sound_masterVolume) {
+ sound.loadAudio('syuilo/queue-jammed').then(buf => jammedAudioBuffer = buf);
+}
for (const domain of ['inbox', 'deliver']) {
prev[domain] = deepClone(current[domain]);