Hello all!
The first issue - if i use webAudio, all audio files is working except on Iphone (all products apple). On ios all sounds not working.
(i’m load mp3 and m4a)
I’m find solution - use html5 audio:
on main file in config i add
audio: {
disableWebAudio: true
},
on class scene i add :
this.sound.pauseOnBlur = false;
this.touch = this.sound.add('touch');
this.touch.play();
After add that settings - audio doesn’t work anywhere.
I am get all code for this example - Phaser 3 Examples
I create new file on my PC, save code for that example - audio doesn’t work anywhere.
What am I doing wrong?
I’ll update my post, you’ve been busy today the situation has changed a bit:
**
I changed the way the sound starts - removed the automatic start, added the start of the sound on a click event on the screen.
Thanks to this action, the sounds began to be played on the computer.
But on any mobile devices, the sound still does not work.
**
On a computer, when you click on the screen, an audio object is created in the HTML5AudioSound object with a large number of methods and properties.
When clicking on the browser screen on a mobile device(start code - this.touch.play()) , nothing is created in the HTML5AudioSound object in the audio object.
Surely someone faced such a problem, tell me why there are no sounds in mobile browsers.