fix(theme): unlock unmuted media autoplay without user interaction on macos

This commit is contained in:
HorizonCode committed 2026-11-01 13:57:47 +01:00
1 parent ce572de0d2
commit a025f9b285
5 files changed
+89 -1

No files matched your search

+1
View File
@@ -248,6 +248,7 @@ export const playThemeMedia = (node: HTMLMediaElement) => {
.catch((error) => {
console.warn('Theme media autoplay was blocked', error);
armAutoplayRetry(node);
void invoke('unlock_media_autoplay').catch(() => {});
});
}
};
+2
View File
@@ -449,6 +449,8 @@ export const loadTheme = async (theme: Theme, themeContainer: HTMLElement, volum
media.volume = volume;
playThemeMedia(media);
});
void invoke('unlock_media_autoplay').catch(() => {});
};
export const deleteTheme = async (themeToUninstall: Theme) => {