# How to play sound on muted iPhone?

**URL:** https://discourse.processing.org/t/how-to-play-sound-on-muted-iphone/12870
**Category:** Libraries
**Created:** [July 21, 2019, 4:13pm UTC](https://discourse.processing.org/t/how-to-play-sound-on-muted-iphone/12870 "2019-07-21T16:13:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![epignosis567](https://avatars.discourse-cdn.com/v4/letter/e/d78d45/32.png) [@epignosis567](https://discourse.processing.org/u/epignosis567)
#### Post date: [July 21, 2019, 4:13pm UTC](https://discourse.processing.org/t/how-to-play-sound-on-muted-iphone/12870/1 "2019-07-21T16:13:57Z")

</div>

Hi. I alluded to this elsewhere in a post but I can’t figure out why P5 won’t play sound on a muted iPhone. I’m new to coding but it seems like a lot of other javascript will play sounds on muted iPhones. Here’s a post from stackoverflow trying to figure out how to PREVENT it from happening:

> <https://stackoverflow.com/questions/43440882/can-javascript-detect-if-a-mobile-device-is-muted>

Has anyone else wondered about this? I don’t understand why P5 sound won’t play but maybe it was an intentional decision? Is there anyway to override it? Most of what I find is posts from people trying to prevent sounds from playing on muted iPhone. So it seems weird…

---

<div class="post-metadata">

### Author: ![epignosis567](https://avatars.discourse-cdn.com/v4/letter/e/d78d45/32.png) [@epignosis567](https://discourse.processing.org/u/epignosis567)
#### Post date: [July 21, 2019, 11:07pm UTC](https://discourse.processing.org/t/how-to-play-sound-on-muted-iphone/12870/2 "2019-07-21T23:07:12Z")

</div>

Most I can tell is that I probably need to be doing something with the AVAudioSession class…but I don’t know what…

---

<div class="post-metadata">

### Author: ![epignosis567](https://avatars.discourse-cdn.com/v4/letter/e/d78d45/32.png) [@epignosis567](https://discourse.processing.org/u/epignosis567)
#### Post date: [September 28, 2019, 8:35pm UTC](https://discourse.processing.org/t/how-to-play-sound-on-muted-iphone/12870/3 "2019-09-28T20:35:48Z")

</div>

Someone here claimed that tone.js does it by utilizing the tag instead. Anyone have any thoughts on that?

> <https://github.com/processing/p5.js/issues/3907>
