Does anyone have an example of script that can work reliably well across IE/Firefox to detect if the browser is capable of displaying embedded flash content. I say reliably because I know its not possible 100% of the time.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
Detecting and embedding Flash within a web document is a surprisingly difficult task.
I was very disappointed with the quality and non-standards compliant markup generated from both SWFObject and Adobe's solutions. Additionally, my testing found Adobe's auto updater to be inconsistent and unreliable.
The JavaScript Flash Detection Library (Flash Detect) and JavaScript Flash HTML Generator Library (Flash TML) are a legible, maintainable and standards compliant markup solution.
-"Luke read the source!"
If you just wanted to check whether flash is enabled, this should be enough.
Note: avoid checking enabledPlugin, some mobile browser has tap-to-enable flash plugin, and will trigger false negative.
To create a Flash object standart-compliant (with JavaScript however), I recommend you take a look at
Unobtrusive Flash Objects (UFO)
http://www.bobbyvandersluis.com/ufo/index.html