HTML5 - Internet Explorer Critical error (howler)

I’m experiencing another critical error being caused by Howler during preloading on Internet Explorer. (have updated my lime dependencies/howler.min.js to the latest commit on github)

It occurs attempting to load the PlayingSound example.

SCRIPT5007: Unable to get property 'state' of undefined or null reference
File: howler.min.js, Line: 1, Column: 28547

lime_media_AudioBuffer.fromFiles = function(paths) {
	var audioBuffer = new lime_media_AudioBuffer();
	audioBuffer.__srcHowl = new Howl({ src : paths, preload : false});
Unable to get property 'state' of undefined or null reference
	return audioBuffer;
1 Like

Can you tell where this error is coming from? Is it one of these lines I changed?

I’ve just tested with the github/goldfire/howler.js versions of /src/howler.core.js (your change version 17 November 2017)

Testing with that version rather than the minified version at lime/dependencies/howler.min.js (same date)

It is showing as one of those edits that is causing this IE specific error

2204 Howler._initSuspended = (Howler.ctx.state != null && Howler.ctx.state === 'suspended');

Unable to get property ‘state’ of undefined or null reference (due to Howler.ctx being null),

commenting out the line temporarily allows IE to load .MP3 . (although the overplay issue within Firefox is continuing either way)

Could you try editing that to be:

Howler._initSuspended = (Howler.ctx && Howler.ctx.state != null && Howler.ctx.state === 'suspended');

amended locally and works, IE now plays audio. (although the overplay issue is still occurring within Firefox for me)

Thanks, I also patched my pull request to the project :slight_smile:

I’ve updated lime to 5.9.1 and openfl to 6.5.1. FF double playing bug has gone, but IE bug still actual:

Called from .__handleError (Unknown script code line 95532)
Called from .render (Unknown script code line 95435)
Called from .f (Unknown script code line 114489)
Called from .tmp (Unknown script code line 94827)
Called from module at lime_app__$Event_$Void_$Void.prototype.dispatch (Unknown script code:50915:4)
Called from module at lime__$backend_html5_HTML5Application.prototype.handleApplicationEvent (Unknown script code:646:5)
Called from .f (Unknown script code line 114489)

SCRIPT5022: InvalidStateError
Stage.hx (1224,12)

Error occurs when i play one fx sound few times without delay between calls… immediatelly…

The IE fix was an instant crash fix, due to a typo. The IE “InvalidStateError” still remains in the howler.js sources.

There’s a fix or two here, but I don’t know if they’re good:

Ok, i understand now. Thanks)