fix(frontend): userActivation
がない環境において不具合が生じる問題を修正 (#13451)
This commit is contained in:
parent
41747b6ee2
commit
792168fdfa
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ export async function loadAudio(url: string, options?: { useCache?: boolean; })
|
||||||
*/
|
*/
|
||||||
export function playMisskeySfx(operationType: OperationType) {
|
export function playMisskeySfx(operationType: OperationType) {
|
||||||
const sound = defaultStore.state[`sound_${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;
|
canPlay = false;
|
||||||
playMisskeySfxFile(sound).finally(() => {
|
playMisskeySfxFile(sound).finally(() => {
|
||||||
|
|
Loading…
Reference in a new issue