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

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 :thinking:

Thank you for your help :slight_smile:

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);
        document.addEventListener('click', resumeAudio);

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…

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

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.

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?

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 :slight_smile: