Skip to content

Commit f18a31c

Browse files
authored
fix(frontend): 画面表示後最初の音声再生が爆音になることがある問題を修正 (#13379)
* fix(frontend): 画面表示後最初の音声再生が爆音になることがある問題を修正 * Update CHANGELOG.md * Update CHANGELOG.md
1 parent 39c4e3a commit f18a31c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- Fix: syuilo/misskeyの時代からあるインスタンスが改変されたバージョンであると誤認識される問題
2121
- Fix: MFMのオートコンプリートが出るべき状況で出ないことがある問題を修正
2222
- Fix: チャートのラベルが消えている問題を修正
23+
- Fix: 画面表示後最初の音声再生が爆音になることがある問題を修正
2324

2425
### Server
2526
- Fix: nodeinfoにenableMcaptchaとenableTurnstileが無いのを修正

packages/frontend/src/scripts/sound.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export async function loadAudio(url: string, options?: { useCache?: boolean; })
126126
*/
127127
export function playMisskeySfx(operationType: OperationType) {
128128
const sound = defaultStore.state[`sound_${operationType}`];
129-
if (sound.type == null || !canPlay) return;
129+
if (sound.type == null || !canPlay || !navigator.userActivation.hasBeenActive) return;
130130

131131
canPlay = false;
132132
playMisskeySfxFile(sound).finally(() => {

0 commit comments

Comments
 (0)