Jump to content

PIXI sound & IE 11 Loader issue (Updated)


charlie_says
 Share

Recommended Posts

Hi, 

I'm working on a game that may need to be playable on IE11 (ugh!)

Having got my basic game now working, I've found that the sound is failing, with the error:

Object doesn't support property or method 'addEventListener'

It seems that pixi sound should work, but, it's not clear to me why this isn't happening for me...

Any ideas?

 

Link to comment
Share on other sites

I'm guessing that you're using the pixi-sound extension? In that case, is this the same problem that you are having: https://github.com/pixijs/pixi-sound/issues/27 ?

If it's not you'd have to make a small fiddle or something, so we can look at your code and test it.

If you are not using any special effects or anything in your pixi.js project, might I suggest using howler.js instead. I use that in most of my projects without any problems.

Link to comment
Share on other sites

Ok, further investigation shows that PIXI sound works fine in IE11 (I'm sure the authors knew this already.)

The issue is completely with the loader...

 

this (from the PIXI sound demo) works as expected

PIXI.loader.add('startGame', 'start_game.{mp3, ogg}');

but, because I have quite a lot of resources to be loaded, I use an array, like so:

let audioFiles = [];



// sounds
for (i = 1; i < 11; i++) {
	audioFiles.push({ name: 'sfx' + i, url: 'sfx' + i + '.{mp3, ogg}'});
}

which doesn't appear to work.

Any ideas?

 

 

Link to comment
Share on other sites

Looks like the same problem that I had with loading textures on iPhones. That is the reason I created my custom PIXI.Loader project. The built in loader tries to load everything at once, which works fine in most cases, but on iPhone something seems to get lost in the mix, and the loading is never finished. That is why I'm not doing any parallel loading in my PIXI.Loader project, but only start to load the next asset when the previous one is done. This seems to fix it for iPhones. I'm not actually sure if it's the same problem with IE11, but it looks like it if you're only having that problem when loading multiple sounds at once.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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