Skip to content

Commit

Permalink
fix(frontend): userActivationがない環境において不具合が生じる問題を修正 (#13451)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyoshoka authored Feb 24, 2024
1 parent 41747b6 commit 792168f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/frontend/src/scripts/sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || !navigator.userActivation.hasBeenActive) return;
if (sound.type == null || !canPlay || ('userActivation' in navigator && !navigator.userActivation.hasBeenActive)) return;

canPlay = false;
playMisskeySfxFile(sound).finally(() => {
Expand Down

0 comments on commit 792168f

Please sign in to comment.