Jump to content

audiofiles (wav and ogg) not loaded in Internet Explorer


Rocco
 Share

Recommended Posts

so i have this in the preloader:

        // AUDIO	this.load.audio('rot_sound', 'audio/tap.wav');        this.load.audio('rem_sound', 'audio/sound3.ogg');        	this.load.audio('titleMusic', 'audio/main_menu.mp3');

It works fine in FF and Chrome, but in IE i get this errormessage,

when i try to load an *.wav or *.ogg file. (mp3 is working)

 

Phaser.Loader error loading file: rem_sound from URL null

Phaser.Loader error loading file: rot_sound from URL null

 

So the mp3 is playing but not the others.

Phaser.Cache.getSound: Invalid key: "rot_sound"
Phaser.Cache.getSound: Invalid key: "rem_sound"
 

i have no idea how to solve this issue,

thanks for help.

Link to comment
Share on other sites

IE can't play ogg files, hence the error - and you didn't provide a fallback format so it can't load anything. Here is how to specify one:

game.load.audio('sfx', [ 'assets/audio/SoundEffects/fx_mixdown.mp3', 'assets/audio/SoundEffects/fx_mixdown.ogg' ]);

The formats in the array are checked in order until it finds one it can load.

Link to comment
Share on other sites

  • 10 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...