To my surprise, my Cordova app (I'm using Icenium) happily plays its background music and gameplay sounds even when my iPhone's sound switch is turned off and on. I believe that the switch is rigged to control "ringer off" and "ringer on," but all other commercial game apps appear to respect the switch and they don't play music when it's turned off.
What's the best way for me to make my Cordova app respect this physical switch and behave consistently with other applications? Thanks!