http://html5test测试数据/
视频和音频代码检测
function CheckAudio(){
VAR myAudio=document.createElement("audio");
if(myAudio.can play Ty PE ){
if(""!=myAudio.canPlayType("audio/mpeg")){
document.wr IT e("你的浏览器支持m P3 格式< br />");
}
if(""!=myAudio.canPlayType('audio/ogg;codecs="vorbis"')){
document.write("你的浏览器支持ogg编码<br/>")
}
if(""!=myAudio.canPlayType('audio/mp4;codecs=" ;m p4a.40.5"')){
document.write("你的浏览器支持aac编码。<br/>");
}
}
else{
document.write("你的浏览器不不支持检测的 音频格式 ");
}
}
function checkVideo(){
var myVideo=document.createElement("video");
if(myVideo.canPlayType){
if(""!=myVideo.canPlayType('video/mp4;codecs="avc1.64001E"')){
document.write("你的浏览器支持h264格式<br/>");
}
if(""!=myVideo.canPlayType('video/ogg;codecs="vp8"')){
document.write("你的浏览器支持vp8格式<br/>");
}
if(""!=myVideo.canPlayType('video/ogg;codecs="theora"')){
document.write("你的浏览器支持theora格式<br/>");
}
}else{
document.write("你的浏览器不支持要检测的 视频格式 ");
}
}
到此这篇关于如何查看浏览器对ht ML 5的支持情况的 文章 就介绍到这了,更多相关浏览器对html5的支持情况内容请搜索以前的文章或继续浏览下面的相关文章,希望大家以后多多支持!
总结
以上是 为你收集整理的 如何查看浏览器对html5的支持情况 全部内容,希望文章能够帮你解决 如何查看浏览器对html5的支持情况 所遇到的问题。
如果觉得 网站内容还不错, 推荐好友。
查看更多关于如何查看浏览器对html5的支持情况的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did211541