Article From:https://segmentfault.com/q/1010000011698465
Question:

Question:

You need to do a flash video playback. When you detect whether the client installs flash, you find the same Chrome browser. You can detect flash plug-ins by running local projects, but navigator. plugins can't detect flas when you deploy them on the server.H plug-in.

The test code is online.

function checkFlash(){
    var flashVersion = false;
    if(document.all) {

        //If the flash version is not suitable here, the IE10 execution will report the error.Var SWF;Try{Swf = new ActiveXObject ('Shockwav)EFlash.ShockwaveFlash');}catch (E) {}If (SWF) {FlashVersion =ParseInt (swf.GetVariable ("$version").Split ("") [1].split (",") "[0]";}Console.log ('ie)");} else {If (navigator.plugins & & navigator.plugins.length > 0) {Var SWF = navigator.plugins["Shockwave Flash"];Console.log (SWF,'yyy');If (SWF) {Var words = swf.description.split ("");For (VaR I = 0; I ≪ words.length; ++i) {If (isNaN (parseInt (words[i]))) continue;FlashVersion = parseInt (words[i]);}}}}Console.Log ('flash version, flashVersion);Return!! flashVersion;};

The screenshots are as follows:
1.Local:

2.On the server:

Answer 0:

I also encountered the same problem, asking for answers.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *