判断用户端有无安装flash插件并返回对应播放器选项提示
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>demo</title>
</head>
<body>
<div class="video" id="CuPlayer"></div>
<script>
var hasFlash = false;
try {
hasFlash = Boolean(new ActiveXObject('ShockwaveFlash.ShockwaveFlash'));
} catch(exception) {
hasFlash = ('undefined' != typeof navigator.mimeTypes['application/x-shockwave-flash']);
}
console.log(hasFlash)
if (hasFlash==false){
document.write("您的Flash插件尚未启用,无法播放视频,建议您 [ <a href='http://get.adobe.com/cn/flashplayer/'>升级Flash插件</a> ] 或 [ 切换到HTML5播放器 ]");
}
</script>
<div style="margin-top:20px;"><embed src="player.swf" flashvars="" quality="high" bgcolor="#000000" width="600" height="400" name="simplevideostreaming" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://get.adobe.com/cn/flashplayer/" /></div>
</body>
</html>