fix: add fade to bg and audio

This commit is contained in:
2026-02-22 14:03:44 +01:00
parent 295c1424c9
commit 0b9d6373bf
2 changed files with 75 additions and 8 deletions
+2 -2
View File
@@ -567,8 +567,8 @@
const volumeStep = (1 - audio.volume) / fadeInSteps;
const fadeInInterval = setInterval(() => {
if (audio.volume < 0.5) {
audio.volume = Math.min(0.5, audio.volume + volumeStep);
if (audio.volume < 0.3) {
audio.volume = Math.min(0.3, audio.volume + volumeStep);
} else {
clearInterval(fadeInInterval);
}