Skip to main content
Lightning Jar - Web Studio Lightning Jar Wordmark

Findings No. 2

The ring/silent switch mutes Web Audio but not media elements

Nothing reports the switch's position. Declare playback intent via navigator.audioSession on Safari 17+, or start a silent looping audio element on the same gesture.

Stem Shovel Web Audio verified iOS; navigator.audioSession on Safari 17+

The iPhone's ring/silent switch mutes Web Audio output entirely while media elements keep playing, and nothing in the platform reports the switch's position. The symptom is a user who hears nothing from an instrument or player that is demonstrably running.

On Safari 17 and later, declare intent before playing: set navigator.audioSession.type = "playback" and Web Audio plays through the switch. Where the audio session API is missing, the workaround is starting a silent looping <audio> element on the same user gesture; it is a no-op everywhere else. The paired trap is the "auto" session type, which does not play through the switch, so anything that changes the session for capture must set "playback" again on every play.

Receipt: Stem Shovel (audio/playThroughSilentSwitch.ts, commit 08e11b7; docs/audio-engine.md, "iOS and the ring/silent switch").

Ask Eljay

Ask about the studio's work, research, packages, or writing. A few starters:

Answers come from this site's own content and link their sources. For anything that matters, email hello@lightningjar.com.