Volume in Safari iPhone not changing

When I use this.app.systems.sound.volume = 0; anywhere else to modify the volume of the system everything works fine.

Safari however, seems to ignore this instruction.

How can I adjust volume in script while using Safari? Thanks

Hi,
i think this will help you.

Hi @Grimmy,

I didn’t have any issue changing sound volume on iOS before, seems to be working for me as expected.

Are you able to reproduce this on an iPhone using a sample project?

This is a Safari problem rather than iOS I think. I seem to be unable to change the volume of the sounds. Only videoSound.pause(); and videoSound.play(); seems to work. Volume on safari seems to always be fixed using the hardware buttons …

I don’t have a small sample project but I could link you to my ‘huge’ project if that would help? I would need to link privately though as it is a client’s project.

Example: my video sound is as follows…

this.videoSound = document.createElement('audio');

Then I use …

this.videoSound.volume = 0.5; //set volume to half

This works on PC, Chrome etc but NOT on Safari. On Safari the volume plays at 1.0 regardless even though the debug console on safari prints that the value of this.videoSound.volume is indeed 0.5. It seems the volume is taken from somewhere else on Safari maybe?

Note: When I emulate Safari in the Chrome browser on windows I do not get the issue. I only get the problem on a real device (iPhone 13)

this.app.systems.sound.volume = 0.5; Also has no effect on Safari iPhone 13

Hi, I already have the sound successfully playing and user interaction has been checked beforehand. The issue is that the volume command does nothing while the track is playing. (It always plays at 1.0 (full volume) on Safari Mobile even if I set volume to zero eg:

this.videoSound.volume = 0;//plays at full volume on Safari mobile but PC/Chrome works as expected. (No volume)

I just tried the solution of creating an AudioContext and controlling the volume via a gain control here

But sadly this didn’t work either. I get no errors but I get no sound either.

:frowning: