# Issue with sound when iPhone is on silent mode using FMOD Studio for WEB/Javascript

**URL:** <https://qa.fmod.com/t/issue-with-sound-when-iphone-is-on-silent-mode-using-fmod-studio-for-web-javascript/16209>\
**Category:** FMOD Studio\
**Tags:** ios, html5, javascript\
**Created:** [September 22, 2020, 9:14am UTC](https://qa.fmod.com/t/issue-with-sound-when-iphone-is-on-silent-mode-using-fmod-studio-for-web-javascript/16209 "2020-09-22T09:14:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![miel20](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@miel20](https://qa.fmod.com/u/miel20)\
**Post date:** [September 22, 2020, 9:14am UTC](https://qa.fmod.com/t/issue-with-sound-when-iphone-is-on-silent-mode-using-fmod-studio-for-web-javascript/16209/1 "2020-09-22T09:14:32Z")

</div>

Hi everyone,

I managed to implement FMOD Studio for web on a React.js project. It works well on desktop browsers. However on an iPhone, using Safari for iOS, it works only if the silent mode is off (side button on the device). If the silent mode is on, no sound is played.

Even though I added the “resumeAudio” function that is executed after a user interaction, no sound is played when the phone is on silent mode.

How can I solve the problem please? Or is it the normal behavior? Many videos/audios apps like Youtube plays even if the phone is in silent mode 🤔

Thank you for your help 🙂

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [September 24, 2020, 7:41am UTC](https://qa.fmod.com/t/issue-with-sound-when-iphone-is-on-silent-mode-using-fmod-studio-for-web-javascript/16209/2 "2020-09-24T07:41:37Z")

</div>

when you said ‘after a user interaction’ do you mean directly from the interaction? ie from an eventListener?

In the standard fmod examples it uses this code to trigger the interaction logic

```
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
    if (iOS)
    {
        window.addEventListener('touchend', resumeAudio, false);
    }
    else
    {
        document.addEventListener('click', resumeAudio);
    }
```

---

<div class="post-metadata">

**Author:** ![miel20](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@miel20](https://qa.fmod.com/u/miel20)\
**Post date:** [September 25, 2020, 1:52pm UTC](https://qa.fmod.com/t/issue-with-sound-when-iphone-is-on-silent-mode-using-fmod-studio-for-web-javascript/16209/3 "2020-09-25T13:52:50Z")

</div>

Hi Brett,

Thank you for your answer. No I mean after an action from the user. In my case I implemented a play button, and the event instance start after this action (button click) and it works. The only thing is that the iPhone needs to be on Ringtone mode…

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [September 28, 2020, 3:20am UTC](https://qa.fmod.com/t/issue-with-sound-when-iphone-is-on-silent-mode-using-fmod-studio-for-web-javascript/16209/4 "2020-09-28T03:20:47Z")

</div>

Hi .  
The ‘resume audio’ logic has to be issued directly from a user interaction event. Otherwise the browser will not start the audio.

---

<div class="post-metadata">

**Author:** ![miel20](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@miel20](https://qa.fmod.com/u/miel20)\
**Post date:** [September 28, 2020, 2:04pm UTC](https://qa.fmod.com/t/issue-with-sound-when-iphone-is-on-silent-mode-using-fmod-studio-for-web-javascript/16209/5 "2020-09-28T14:04:25Z")

</div>

Hi Brett,

The “resumeAudio” function is executed anyway when the user clicks on my button as it is a user interaction event… The log “Resetting audio driver based on user input.” is printed.  
On click on my button, the event instances just start.

The problem here is not the user interaction but the iphone sound behavior, as it perfectly works when the phone is not on silent mode…

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [September 29, 2020, 1:51am UTC](https://qa.fmod.com/t/issue-with-sound-when-iphone-is-on-silent-mode-using-fmod-studio-for-web-javascript/16209/6 "2020-09-29T01:51:52Z")

</div>

ok apologies, I see you were mainly referring to the phone being in silent mode. I dont know what makes other apps work in silent mode but I assume when they choose silent they would prefer the audio to be silent?

---

<div class="post-metadata">

**Author:** ![miel20](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@miel20](https://qa.fmod.com/u/miel20)\
**Post date:** [October 1, 2020, 1:22pm UTC](https://qa.fmod.com/t/issue-with-sound-when-iphone-is-on-silent-mode-using-fmod-studio-for-web-javascript/16209/7 "2020-10-01T13:22:08Z")

</div>

Well, many music apps work even if the phone is on silent mode ^^ Especially when you click on a play button, it usually plays a video or/and sound. But it’s fine, I might just notify the user to turn off the silent mode.

Thank you 🙂
