fix(theme): unlock unmuted media autoplay without user interaction on macos
This commit is contained in:
1 parent
ce572de0d2
commit
a025f9b285
5 files changed
+89
-1
No files matched your search
@@ -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(() => {});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user