nontechguy
nontechguy

Reputation: 761

HTML Audio in IE

I am having an issue in IE 10 and IE 11 where if the audio device is disabled my website will not load. Looking at the console the load does not progress past loading the first audio item. I am using soundjs does anyone know if there is a way to detect if the hardware is disabled in the browser in order for me to add some kind of error message asking the user to please enable their sound device?

Upvotes: 0

Views: 162

Answers (2)

nontechguy
nontechguy

Reputation: 761

This looks like an issue with soundJS because when testing on createjs.com/soundjs the issue is re-created.

  1. Visit createjs.com/soundjs
  2. Head down to test the sounds and click to play.
  3. Disable your machines sound bu right clicking in the tool bar and selecting disable.
  4. Reload the page.
  5. Now sounds do not load.

Side by side comparrison enter image description here

Upvotes: 0

Simon Bosley
Simon Bosley

Reputation: 1154

From the documentation

The function:

createInstance ( src [startTime=null] [duration=null] )

Works like this:

Creates a AbstractSoundInstance using the passed in src. If the src does not have a supported extension or if there is no available plugin, a default AbstractSoundInstance will be returned that can be called safely but does nothing.

If you can test for the default AbstractSoundInstance, then you'll know when plugins are not available on the clients browser.

Upvotes: 0

Related Questions