Test whether a device has Flash enabled, Modernizr style

时光毁灭记忆、已成空白 提交于 2019-12-25 06:38:26

问题


Is there a way to test whether a device supports Flash, similar to the way http://www.modernizr.com can feature-detect browsers and add a class to the body?


回答1:


The template files created by Flash or Flashbuilder etc. have javascript checks in place to verify the user has the correct flash player version installed, if not they are given the option to download the player. You can replace this download link with anything you want so it'll fall back on whatever you choose if there is no flash player present. Alternatively you can use the User-Agent HTTP Header to determine if they are using an iOS device and eliminate the possibility of them running flash entirely and then assume that if they have anything else they can install the flash player (yes I'm a bit bitter).



来源:https://stackoverflow.com/questions/9038034/test-whether-a-device-has-flash-enabled-modernizr-style

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!