> Frustratingly, browsers can decide to block a website from playing any sound. iOS Safari seems particularly strict about this. So, if you’re not hearing a click sound when tapping the big red button, please check out this website on a desktop computer.
While I understand this behavior from Apple in a user-first perspective and do find audio on mobile web to be annoying in most cases, an easy way to allow audio to play on an iPhone that isn't "use a desktop" seems to be flipping the hardware switch to turn off silent mode.
I'm not proud to admit it took 5 minutes of poking and a Google/Gemini search to figure that out...
The general rule is that audio in a tab on ios is banned until a user initiated event (eg a play button) plays audio. After that, audio works.
After a lot of trial and error, I've taken to putting a button on any page I make that uses audio with the label "Click here to unmute". Have it play a silent audio clip when it's pressed. After that, audio works.
The UI on this page should work fine on ios if the big red play button simply plays audio directly via webaudio. Who knows how it's actually coded though. It looks like an LLM's work. Probably a mess.
> I've taken to putting a button on any page I make that uses audio with the label "Click here to unmute". Have it play a silent audio clip when it's pressed. After that, audio works.
So anyone who wants to defy the reason tabs are initially muted simply needs to lead the visitor to click something (instead of "unmute," how about a throbbing "next" arrow, or any innocuous link such as a menu item) that doesn't navigate but can give the illusion of navigating?
This is extremely satisfying, a total joy to play around with and a huge resource for people who like clicky button sounds! Thank you for putting it together!
> Frustratingly, browsers can decide to block a website from playing any sound. iOS Safari seems particularly strict about this. So, if you’re not hearing a click sound when tapping the big red button, please check out this website on a desktop computer.
FYI, setting `navigator.audioSession.type` to `"playback"` will allow the sounds to play on iOS even when silent mode is on. (It defaults to `"ambient"`.)
On iOS versions below 16.4, this won't work as reliably; there are hacks you can do with `AudioContext`^[1] instead.
> The sounds were recorded in the same sound-treated room using a Zoom H4 recorder, with additional processing to remove noise in Adobe Audition. The only exceptions are synth-on and synth-off, which were created digitally using the Current VST synth. All sounds are stereo.
This is impressive, nice work, thanks for this contribution! A writeup on this process specifically could be intriguing. Just to clarify, I understand you've chosen to license the sounds themselves are under the MIT license?
While I understand this behavior from Apple in a user-first perspective and do find audio on mobile web to be annoying in most cases, an easy way to allow audio to play on an iPhone that isn't "use a desktop" seems to be flipping the hardware switch to turn off silent mode.
I'm not proud to admit it took 5 minutes of poking and a Google/Gemini search to figure that out...
After a lot of trial and error, I've taken to putting a button on any page I make that uses audio with the label "Click here to unmute". Have it play a silent audio clip when it's pressed. After that, audio works.
The UI on this page should work fine on ios if the big red play button simply plays audio directly via webaudio. Who knows how it's actually coded though. It looks like an LLM's work. Probably a mess.
Also, here's the author's AI policy: https://www.joshwcomeau.com/ai-policy/
They're also a somewhat active user here.
So anyone who wants to defy the reason tabs are initially muted simply needs to lead the visitor to click something (instead of "unmute," how about a throbbing "next" arrow, or any innocuous link such as a menu item) that doesn't navigate but can give the illusion of navigating?
I would find it frustrating if my phone was set to silent and it played button noises on a website.
RE: your solution - For iPhones with action buttons, can disable silent mode in control center.
FYI, setting `navigator.audioSession.type` to `"playback"` will allow the sounds to play on iOS even when silent mode is on. (It defaults to `"ambient"`.)
On iOS versions below 16.4, this won't work as reliably; there are hacks you can do with `AudioContext`^[1] instead.
[1]: https://github.com/feross/unmute-ios-audio
For me this website spins up the fans on my M4 Pro Mac mini when running it in Firefox Developer Edition.
Ironically, I think it's the "Whimsical Animations" ad banner.
This is impressive, nice work, thanks for this contribution! A writeup on this process specifically could be intriguing. Just to clarify, I understand you've chosen to license the sounds themselves are under the MIT license?
https://www.youtube.com/shorts/o_n5W2I2p_M
Switch Courtesy of the Amsterdam Bakelite Collection:
https://www.amsterdambakelitecollection.com/collection.php
Majestic Stone Zen Garden Gorilla Courtesy of Boeddha Beelden:
https://www.youtube.com/shorts/YKHP_ZxneBQ