soundmanager2 will use html5 audio instead of flash if various properties are set and it thinks conditions are Ok.
Once soundmanager2 has decided, is there a property on the SoundManager object that will tell me whether it went for html5 or flash?
(I know it mentions it in the debug log but I'm looking for a property I could query)
soundmanager2 will use html5 audio instead of flash if various properties are set and it thinks conditions are Ok.
Once soundmanager2 has decided, is there a property on the SoundManager object that will tell me whether it went for html5 or flash?
(I know it mentions it in the debug log but I'm looking for a property I could query)
Share Improve this question asked Apr 24, 2011 at 14:45 codeulikecodeulike 23.1k29 gold badges127 silver badges171 bronze badges3 Answers
Reset to default 5I don't think it's documented but the SMSound
object has an isHTML5
property that you can check to see if a given sound is using HTML5 Audio.
The SoundManager
object also has an html5
property that contains information about what audio formats are supported by the current browser.
set this on soundManager.setup()
soundManager.setup({
useHTML5Audio: true,
preferFlash: false
});
There are 2 ways:
Check the version property of your SoundManager2 instance:
> soundManager.version "V2.97a.20131201 (AS3/Flash 9)" // Flash version "V2.97a.20131201 (HTML5-only mode)" // HTML5 version
Check boolean:
> soundManager.html5.usingFlash