本文介绍了检测 FLASH 插件崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!
问题描述
有没有办法通过javascript检测主流浏览器(firefox,即chrome、safari和opera)中的flash插件崩溃?
Is there any way to detect flash-plugin crashes in major browsers (firefox, ie, chrome, safari and opera) via javascript?
推荐答案
我不确定这是否有效.您可以定期获取对 flash 对象的引用,并检查它是否具有 SetVariable 方法.
I'm not sure whether that works or not. You can periodically get a reference to flash object and check whether it has the method SetVariable.
function checkFlashCrashed() {
try {
var tmp = document.getElementById("flashObjectId").SetVariable;
if(!tmp) {
alert("Flash crashed");
return;
}
} catch (e) {
alert("Flash crashed");
return;
}
setTimeout(checkFlashCrashed, 1000); // check it out every one second
}
SetVariable 是一个可以从 Javascript 代码中调用的接口函数.如果 flash 崩溃了,它的界面也应该崩溃.因此,这可能是一个解决方案.
SetVariable is an interface function that can be called from Javascript code. If flash crashes, its interface should crash, too. Hence, that may be a solution.
这篇关于检测 FLASH 插件崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
The End



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)