Is there any way to detect flash-plugin crashes in major browsers (firefox, ie, chrome, safari and opera) via javascript?
相关问题
- 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?
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.
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.
Maybe you could use a keep alive script in your as3 file that talks to the page js, if the js doesn't get a call for a few seconds, you could have it time out and handle it as a flash crash.
It depends how you feel about false positives.
You can have a watchdog that make a ajax call "The flash has not crashed", if the flash seems to still be working. And asume that flash has crashed if is not written. This will create false positives if the user close the page before the check.
You can have a watchdog that make a ajax call "The flash has crashed", if the flash seems to not work. This will miss crashes, like crash that kill the whole browser with it.
Maybe you can have both watchdogs so you get a better idea of whats going on.
Use global exception handling in ActionScript to call an external interface on UncaughtErrorEvent.UNCAUGHT_ERROR.
When an error occurs in the Flash Player runtime, it may catch the exception and signal JavaScript.