<audio>
标签支持的音频文件格式竟然没有一种能在所有浏览器中通用的?
IE 9 | Firefox 3.5 | Opera 10.5 | Chrome 3.0 | Safari 3.0 | |
---|---|---|---|---|---|
Ogg Vorbis | √ | √ | √ | ||
MP3 | √ | √ | √ | ||
Wav | √ | √ | √ |
高洛峰2017-04-17 11:14:41
This form has expired;
The new version of firefox already supports mp3 decoding; the latest versions of most browsers support decoding mp3; firefox nightly seems to support h264 decoding, so the format battle should be regarded as a victory for h264.
But in order to be compatible with all browsers, flash is essential (the ie family that cannot be discarded). ogg, ogv, mp4, mp3, webm, etc. will coexist for a long time. Like the video on the homepage of Bing, if ua is ie, it will be mp4, and if ua is firefox, it will be ogv.
怪我咯2017-04-17 11:14:41
Currently, the latest versions of all mainstream PC and mobile browsers support the mp3 format. http://html5test.com/compare/feature/audio-mp3.html
In fact, the mp3 format has been popularized on mobile devices for a long time, because the CPU is too weak and can only accept the mp3/mp4 hardware decoding solution.
阿神2017-04-17 11:14:41
So you still have to embed some players, which will support a wider range of video types, such as JW Player or GrindPlayer. The limitation of relying on the browser itself to parse videos is indeed quite large.
PHP中文网2017-04-17 11:14:41
Even when using a third-party player, multiple audio files are used to resolve compatibility
大家讲道理2017-04-17 11:14:41
Mainly because the production companies of each browser are different, and the final standard of html5 has not yet been released, so everyone can support whichever format they like~
ringa_lee2017-04-17 11:14:41
The reason for this is that it belongs to the same category as browser compatibility. Different browser kernel support results in different supported formats