Safari sets audio duration to Infinity

Hello,
I have problem with Safari and audio. When my game start I can hear the sound so this is good (.mp3). I have and additional button that invokes audio replay of a word in another language. It works well on Chrome, FireFox etc. but on Safari the audio is played only once, and the duration of an audio is set to Infinity, isPaused to true. In this case I can not play it again cos it is suspended.

It turns out Safari cannot see the proper duration of a track. Is there any solution to this?

I did find solution: If I set the config prop

audio: { disableWebAudio: true }

it turns out that Phaser is using HTML 5 Audio and it should use WebAudio instead. It works on Chrome and most modern up to date browsers but in Safari HTML 5 Audio cause the problem, it should use WEbAudio instead.

I just did remove the

audio: { disableWebAudio: true }

Now works well.

If you can make a test case, you should open a Phaser issue.

1 Like