Integrating Flash detection with SoundManager2
I'm not entirely comfortable with the timing of certain events in JavaScript (who is, especially with Chrome!!??), and I wanted to integrate some Flash detection, either using the official model or using featureblend (not that fussed about a sophisticated flash install, simply detecting Flash and shooing those users who haven't installed away).
Anyway, I notice that when Flash is not installed, the soundmanager2.js script fails on initial load due to a missing property which seems to be because Flash is not installed rather than cleanly handling the error. (Only tested in this state on IE8).
What I wanted to do was wrap that initial script so it didn't execute but as it is brought in due to being a global script, I didn't see how to do this.
Rather than reinvent a wheel that is likely to be somewhat square, has anyone got a reliable and robust way of implementing Flash installation checking?
Anyway, I notice that when Flash is not installed, the soundmanager2.js script fails on initial load due to a missing property which seems to be because Flash is not installed rather than cleanly handling the error. (Only tested in this state on IE8).
What I wanted to do was wrap that initial script so it didn't execute but as it is brought in due to being a global script, I didn't see how to do this.
Rather than reinvent a wheel that is likely to be somewhat square, has anyone got a reliable and robust way of implementing Flash installation checking?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?I haven't thoroughly tested SM2 in the "no flash installed" case, admittedly - it's possible a JS error could be thrown, though JS should be waiting for a call from Flash and should not be trying to call undefined methods on an object/embed.. Rather, it should write the Flash to the DOM and then wait for a callback (ie., when Flash loads, if at all.)
For detecting, you could use something like flashdetect and if flash is supported, then load or run SM2. If you want to defer SM2's start-up, you can set var SM2_DEFER = TRUE in your script before loading SM2, or look at dynamically loading it with JS:
http://getsatisfaction.com/schillmani...
Or, SM2_DEFER:
http://getsatisfaction.com/schillmani...
The company says
this answers the question
Loading Profile...



EMPLOYEE