Sfx not loading/playing on Safari

Hi! I’m using Phaser version 3.24.1 in my current project. I’m loading wav files within preload method and in create method I have some images. On clicking those images I play this sound. I get the following exception that the key related to this sound is not present.

Here I’m loading this file.

This issue occurs only on Safari and works on every other browser like Chrome,Firefox,Opera … I’m quite bugged by this issue because its pretty straightforward i.e. everything gets loaded in preload method and is guaranteed to be there when create method is called. So any help guys? Thanks!

I think that’s probably the bug where Safari incorrectly says it does not play WAV files and so Phaser doesn’t load any for Safari (thus the error message is true). You can avoid it by using non-WAV sounds or updating Phaser (≥ v3.50). Or you can force through it like

new Phaser.Game({
  callbacks: {
    preBoot: function (game) {
      if (game.device.browser.safari) {
        game.device.audio.wav = true;
      }
    }
  }
});

Thanks! I forcefully allowed Phaser to load wav files on safari … worked like a charm!