mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +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) {
|
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 New Issue
Block a user