Feature detection

Video tag browser compatibility test

Video feature detection by browsers is rudimentary at best.

This table gives a rough overview over the most commonly used video types.

The result column shows what your browser returns for:



where type is a possible value of a SOURCE tag's type attribute.

The types marked in blue are the ones recommended for use with Flowplayer.

format suffix video codec profile level audio codec profile mime type; codecs result
ogg ogv theora vorbis video/ogg
video/ogg; codecs="theora, vorbis"
webm webm vp8 vorbis video/webm
video/webm; codecs="vp8, vorbis"
opus video/webm; codecs="vp8, opus"
vp9 opus video/webm
video/webm; codecs="vp9, opus"
vorbis video/webm; codecs="vp9, vorbis"
hls m3u8 avc aac application/x-mpegurl
mpeg4 part 10 mp4, m4v, mov avc aac video/mp4
baseline 1.3 lc video/mp4; codecs="avc1.66.13, mp4a.40.2"
video/mp4; codecs="avc1.42c00d, mp4a.40.2"
baseline 3.0 hc video/mp4; codecs="avc1.66.30, mp4a.40.5"
video/mp4; codecs="avc1.42c01e, mp4a.40.5"
3.1 video/mp4; codecs="avc1.42c01f, mp4a.40.5"
main 3.0 video/mp4; codecs="avc1.77.30, mp4a.40.5"
video/mp4; codecs="avc1.4d401e, mp4a.40.5"
3.1 video/mp4; codecs="avc1.4d401f, mp4a.40.5"
high 4.1 video/mp4; codecs="avc1.640029, mp4a.40.5"
m4v m4v video/x-m4v
mov mov video/quicktime
mpeg4 part 2 mp4, m4v, mov mpeg4 visual mp3 video/mp4; codecs="mp4v.20.8, mp4a.40.3"
3gp amr video/mp4; codecs="mp4v.20.8, samr"

The are many more types and combinations available, but in almost all cases the four recommended types are sufficient as type specification. You can for instance declare a video which is served with the video/x-m4v mime type as video/mp4.

The codecs specification could be used for fine-grained feature detection - in theory. In practice it does not influence the JavaScript canPlayType() results from browsers, for instance:

The codecs specifications do work however for HLS, i.e., inside m3u8 files. For backwards compatibility with older iOS versions you might want to favour the old notation over the new one, for instance avc1.66.30 instead of avc1.42c01e for Baseline, Level 3.0.

WEBM: vp9 is the next generation vp8 codec and only supported in recent browsers. For backwards-compatibility ou should offer vp8 with the short video/webm type specification.

HLS: application/apple.vnd.mpegurl is a valid mime type, but it will not be recognized by any browser.

Flash does not play back MPEG-4 Part 2.