是否可以检测移动浏览器是否可以播放Flash文件。 [英] Is It Possible to detect whether mobile browser can play flash file or not.
本文介绍了是否可以检测移动浏览器是否可以播放Flash文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用detectmobilebrowsers.com检测到它是否是移动浏览器。
现在我需要检测移动浏览器是否可以播放闪存? />
有可能吗?
如果是,怎么样?
>
请解释..
I have detected whether it is mobile browser or not using detectmobilebrowsers.com.
Now i need to detect whether mobile browser can play flash or not?
Is It possible?
If Yes, how?
Please explain..
推荐答案
你可以像这样解决。 :
var hasFlash = detectFlashPlayerInstalled();
var flashEnabled = false;
/ *尝试加载swf文件然后等待一段时间,然后...... * /
var isDisabled = hasFlash &&!flashEnabled;
使用javascript函数:
函数flashAlive(){
flashEnabled = true;
}
函数detectFlashPlayerInstalled(){
// TODO:以更好的方式检测闪存,这将暂时执行
return swfobject.hasFlashPlayerVersion(VERSION);
}
来自一个微小的swf文件,包含:
getURL(javascript:flashAlive(); );
我希望在某种程度上有所帮助。
you can resolve like this. :
var hasFlash = detectFlashPlayerInstalled();
var flashEnabled = false;
/* attempt to load the swf file then wait for some time, then... */
var isDisabled = hasFlash && !flashEnabled;
That works along with javascript functions like:
function flashAlive() {
flashEnabled = true;
}
function detectFlashPlayerInstalled() {
//TODO: detect flash in a better way, this will do for now
return swfobject.hasFlashPlayerVersion(VERSION);
}
called from a tiny swf file containing:
getURL("javascript:flashAlive();");
I hope that helps in some way.
这篇关于是否可以检测移动浏览器是否可以播放Flash文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文