function showVsbVideo(vurl, vheight, vwidth, align, style, vautoplay, mid) { if (vurl == "") { return } var outputHTML = ""; if (hasPlayHtml5Vedio()) { outputHTML = outPutHTML5Video(vurl, vheight, vwidth, vautoplay, align, style, mid) } else { outputHTML = outPutFlashVideo(vurl, vheight, vwidth, vautoplay, align, style, mid) } document.write(outputHTML) } function hasPlayHtml5Vedio() { var a = document.createElement("video"), c = !!a.canPlayType; if (c) { c = new Boolean(c), c.ogg = a.canPlayType('video/ogg; codecs="theora"'); var d = 'video/mp4; codecs="avc1.42E01E'; c.h264 = a.canPlayType(d + '"') || a.canPlayType(d + ', mp4a.40.2"'), c.webm = a.canPlayType( 'video/webm; codecs="vp8, vorbis"') } return c } function outPutFlashVideo(videoUrl, wHeight, wWidth, bautoPlay, align, style, mid) { if (!mid || mid == "") { mid = "id=_vsb_player" } var flashUrl = ""; var configstr = ""playlist":[{"url":"" + videoUrl + "","scaling":"fit","autoPlay":" + bautoPlay + ","autoBuffering":"false"}]"; flashUrl = flashUrl + ''; flashUrl = flashUrl + ''; flashUrl = flashUrl + ""; return flashUrl } function outPutHTML5Video(videoUrl, wHeight, wWidth, bautoPlay, align, style) { // 视频禁止下载 var res = ' '; return res } function outVideoForMobile(vurl, vheight, vwidth, vautoplay) { if (hasPlayHtml5Vedio()) { var res = ' '; document.write(res) } else { alert("不支持") } };