最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
浏览器对html5的支持情况如何查看 浏览器对html5的支持情况查看方法
时间:2022-06-25 17:52:59 编辑:袖梨 来源:一聚教程网
浏览器对html5的支持情况如何查看?本篇文章小编给大家分享一下浏览器对html5的支持情况查看方法,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看。
视频和音频代码检测
function CheckAudio(){ var myAudio=document.createElement("audio"); if(myAudio.canPlayType){ if(""!=myAudio.canPlayType("audio/mpeg")){ document.write("你的浏览器支持mp3格式
"); } if(""!=myAudio.canPlayType('audio/ogg;codecs="vorbis"')){ document.write("你的浏览器支持ogg编码
") } if(""!=myAudio.canPlayType('audio/mp4;codecs="mp4a.40.5"')){ document.write("你的浏览器支持aac编码。
"); } } else{ document.write("你的浏览器不不支持检测的音频格式"); } } function checkVideo(){ var myVideo=document.createElement("video"); if(myVideo.canPlayType){ if(""!=myVideo.canPlayType('video/mp4;codecs="avc1.64001E"')){ document.write("你的浏览器支持h264格式
"); } if(""!=myVideo.canPlayType('video/ogg;codecs="vp8"')){ document.write("你的浏览器支持vp8格式
"); } if(""!=myVideo.canPlayType('video/ogg;codecs="theora"')){ document.write("你的浏览器支持theora格式
"); } }else{ document.write("你的浏览器不支持要检测的视频格式"); } }
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17