From 280f8f771dce440445444c8a2039d1696145f78c Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Mon, 17 Jun 2024 09:50:26 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20deck=20ui=E3=81=AE=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E9=9F=B3=E3=81=8C=E9=87=8D=E3=81=AA=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/scripts/sound.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/scripts/sound.ts b/packages/frontend/src/scripts/sound.ts index fcd59510df18..5eb845e3afe4 100644 --- a/packages/frontend/src/scripts/sound.ts +++ b/packages/frontend/src/scripts/sound.ts @@ -127,9 +127,16 @@ export async function loadAudio(url: string, options?: { useCache?: boolean; }) export function playMisskeySfx(operationType: OperationType) { const sound = defaultStore.state[`sound_${operationType}`]; if (sound.type == null || !canPlay || ('userActivation' in navigator && !navigator.userActivation.hasBeenActive)) return; + playMisskeySfxFile(sound); +} + +export async function playMisskeySfxFile(soundStore: SoundStore) { + if (soundStore.type === null || (soundStore.type === '_driveFile_' && !soundStore.fileUrl)) { + return; + } canPlay = false; - playMisskeySfxFile(sound).finally(() => { + playMisskeySfxFileInternal(soundStore).finally(() => { // ごく短時間に音が重複しないように setTimeout(() => { canPlay = true; @@ -141,7 +148,7 @@ export function playMisskeySfx(operationType: OperationType) { * サウンド設定形式で指定された音声を再生する * @param soundStore サウンド設定 */ -export async function playMisskeySfxFile(soundStore: SoundStore) { +export async function playMisskeySfxFileInternal(soundStore: SoundStore) { if (soundStore.type === null || (soundStore.type === '_driveFile_' && !soundStore.fileUrl)) { return; } From 93c6708e3373bb5edaab36eb919ec0806c0c57f8 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Mon, 17 Jun 2024 09:51:44 +0900 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20Fix:=20deck=20ui=E3=81=AE=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E9=9F=B3=E3=81=8C=E9=87=8D=E3=81=AA=E3=82=8B=E5=95=8F?= =?UTF-8?q?=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35a2364ef002..4caeb36c4e7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Client - Fix: ウィジェットでVRTL/VSTLが使用できない問題を修正 +- Fix: deck uiの通知音が重なる問題 (#14029) ### Server - Enhance: `vmimiRelayTimelineImplemented` と `disableVmimiRelayTimeline` nodeinfo に追加しました