Skip to content

Commit 792168f

Browse files
authored
fix(frontend): userActivationがない環境において不具合が生じる問題を修正 (#13451)
1 parent 41747b6 commit 792168f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/frontend/src/scripts/sound.ts

Lines changed: 1 addition & 1 deletion
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 || !navigator.userActivation.hasBeenActive) return;
129+
if (sound.type == null || !canPlay || ('userActivation' in navigator && !navigator.userActivation.hasBeenActive)) return;
130130

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

0 commit comments

Comments
 (0)