audio "fix"
All checks were successful
Deploy website / deploy (push) Successful in 26s

This commit is contained in:
2026-03-04 21:54:21 +00:00
parent 3afab4c7fa
commit 0d367e43a6
3 changed files with 21 additions and 1 deletions

View File

@@ -119,4 +119,13 @@
#smileos-window-content img {
width: 100%;
}
#smileos-restart-music {
color: #FF4343;
cursor: pointer;
}
#smileos-restart-music:hover {
font-weight: 700;
}

View File

@@ -89,6 +89,14 @@ document.addEventListener("DOMContentLoaded", async function() {
document.getElementById("smileos-window-content").innerHTML = tips_of_the_day[Math.floor(Math.random() * tips_of_the_day.length)];
await playAudio('/static/content/smileos/SmileOS2Startup.ogx');
var music = new Audio('/static/content/smileos/Shopmusic.ogx');
music.loop = true;
music.play();
});
document.getElementById("smileos-restart-music").addEventListener("click", async function() {
await playAudio('/static/content/smileos/SmileOS2Startup.ogx');
var music = new Audio('/static/content/smileos/Shopmusic.ogx');
music.loop = true;
music.play();

View File

@@ -49,7 +49,10 @@
</div>
</section>
<section>
Note: this page has background music, you may have to allow the music in the browser and refesh to let it play :P
<p>
Note: this page has background music, you may have to allow the music in the browser and refesh to let it play, or you can try
press <a id="smileos-restart-music">this</a> to restart it
</p>
</section>
{% endblock %}