fix(frontend): 画面表示後最初の音声再生が爆音になることがある問題を修正 (#13379)

* fix(frontend): 画面表示後最初の音声再生が爆音になることがある問題を修正

* Update CHANGELOG.md

* Update CHANGELOG.md
This commit is contained in:
zyoshoka
2024-02-20 15:26:11 +09:00
committed by GitHub
parent 39c4e3a4f5
commit f18a31c628
2 changed files with 2 additions and 1 deletions

View File

@@ -126,7 +126,7 @@ 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) return;
if (sound.type == null || !canPlay || !navigator.userActivation.hasBeenActive) return;
canPlay = false;
playMisskeySfxFile(sound).finally(() => {