测试设备是否已启用Flash,采用Modernizr样式 [英] Test whether a device has Flash enabled, Modernizr style

查看:94
本文介绍了测试设备是否已启用Flash,采用Modernizr样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以测试设备是否支持Flash,类似于 http://www.modernizr.com 可以检测特征的浏览器并在正文中添加类吗?

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?

推荐答案

由Flash或Flashbuilder等创建的模板文件具有javascript检查功能,以验证用户是否安装了正确的Flash Player版本,如果没有提供,下载播放器的选项.您可以使用所需的任何内容替换此下载链接,这样,如果没有Flash Player,它将回到您选择的任何内容上.或者,您可以使用User-Agent HTTP标头来确定他们是否正在使用iOS设备,并消除它们完全运行Flash的可能性,然后假设如果他们还有其他功能,则可以安装Flash Player(是的,我有点苦).

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).

这篇关于测试设备是否已启用Flash,采用Modernizr样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆