mirror of
https://github.com/hotomoe/hotomoe
synced 2024-12-04 01:38:09 +09:00
fix(frontend): userActivation
がない環境において不具合が生じる問題を修正 (#13451)
This commit is contained in:
parent
41747b6ee2
commit
792168fdfa
@ -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(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user