spin now works on ios

This commit is contained in:
PossiblyAxolotl 2024-11-19 18:28:05 -06:00
parent b639656b2f
commit 0756c34195
3 changed files with 3 additions and 8 deletions

View file

@ -59,13 +59,14 @@
button {
position: absolute;
display: none;
}
</style>
</head>
<body>
<canvas></canvas>
<img src="/images/ui/rock.png" id="rock">
<audio hidden loop id="audio"><source src="/audio/rockspin.ogg" type="audio/mp3"></audio>
<audio autoplay loop id="audio" preload="auto"><source src="/audio/rockspin.wav" type="audio/wav"></audio>
<button id="b" onclick="a.play(); this.style.display = 'none'">Autoplay is disabled! Click here to play audio.</button>
<script>
@ -74,13 +75,7 @@
var p = a.play();
if (p !== undefined) {
p.then(_ => {
b.style.display = 'none';
}).catch(error => {
b.style.display = 'auto';
});
}
p.catch(function() {b.style.display = "block"});
</script>
</body>
</html>

BIN
site/audio/rockspin.mp3 Normal file

Binary file not shown.

BIN
site/audio/rockspin.wav Normal file

Binary file not shown.