Hacker News new | past | comments | ask | show | jobs | submit login

I don't really understand how it runs on iOS devices at all - to the best of my knowledge, it simply isn't possible to control device audio volume from javascript on iOS [1]. Or at least, that seemed to be the consensus last time I attempted to.

[1] https://developer.apple.com/library/safari/documentation/Aud... - "On iOS devices, the audio level is always under the user’s physical control. The volume property is not settable in JavaScript."




You can always reduce the volume in software before sending it to whatever API plays your sounds. This is especially easy if you're synthesizing the sound with the desired output volume known.


It should be noted that this operation (digital gain staging) reduces headroom/resolution, although in practice this doesn't really matter. Especially not with ambient rain sounds.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: