big clean up

This commit is contained in:
Tom Boullay
2026-05-08 03:02:26 +01:00
parent e4f6ec211c
commit 6d9eac291e
20 changed files with 208 additions and 94 deletions
+16 -1
View File
@@ -125,7 +125,22 @@ export class AudioManager {
this._musicUnlockHandler = () => {
this._removeMusicUnlockHandler();
void this._music?.play();
const music = this._music;
if (!music) return;
void music.play().catch((error: unknown) => {
if (
error instanceof DOMException &&
AudioManager.IGNORED_PLAYBACK_ERRORS.has(error.name)
) {
return;
}
logger.error("AudioManager", "Failed to unlock music playback", {
path: this._musicPath,
error: AudioManager._toLogValue(error),
});
});
};
window.addEventListener("pointerdown", this._musicUnlockHandler, {