开发者

flashplayer vs html5

开发者 https://www.devze.com 2023-04-12 08:58 出处:网络
Is there anyway to detect if the browser has a flash player installed or supported by the html5 ? Any javascript trick ? Like below code.

Is there anyway to detect if the browser has a flash player installed or supported by the html5 ? Any javascript trick ? Like below code.

<!--<noscript>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
            <param name="movie" value="${swf}.swf" />
            <param name="quality" value="high" />
            <param name="bgcolor" value="${bgcolor}" />
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="allowFullScreen" value="true" />
            <!--[if !IE]>-->
            <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
                <param name="quality" value="high" />
                <param name="bgcolor" value="${bgcolor}" />
                <param name="allowScriptAccess" value="sameDomain" />
                <param name="allowFullScreen" value="true" />
            <!--<![endif]-->
            <!--[if gte IE 6]>-->
                <p> 
                    Either scripts and active content are not permitted to run or Adobe Flash Player version
                    ${version_major}.${version_minor}.${version_revision} or greater is not installed.
                </p>
            <!--<![endif]-->
             开发者_运维百科   <a href="http://www.adobe.com/go/getflashplayer">
                    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
                </a>
            <!--[if !IE]>-->
            </object>
            <!--<![endif]-->
        </object>
    </noscript> -->     

Any idea would be appreciated.


You could use this JS library for FP detection - http://www.featureblend.com/javascript-flash-detection-library.html

Alternately, you could also check out this from Adobe - http://www.adobe.com/devnet/flashplayer/articles/swfobject.html


try this HTML5 video site You can use their API


Browsers not supporting Flash will fall through the <object> element to the nested <p> without any JavaScript voodoo. The same logic applies to the HTML5 <video> element.

<video>
    ...
    <object type="application/x-shockwave-flash">
    ....
        <!-- Do something else instead -->
    </object>
</video>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号