Skip to content

Comment on Decoding the HTML 5 video codec debateparent

Comments

The end result is the same. You can't use <video> if you want it to work on all platforms.

Ah, but you can like so:

  <video>
      <source src="example-video.mp4" type="video/mp4" />
      <source src="example-video.ogv" type="video/ogg" />
  </video>

I'm not really sure how it's going to work in Chrome, though. The article says they are going to support both codecs. As a result it's up to browser which video source to choose. It's interesting whether it will pick the first source or the 'preferred' one (presumably, mp4). Is it possible to set the source preference in HTML? Like:

  <video>
      <source src="example-video.mp4" type="video/mp4" />
      <source src="example-video.ogv" type="video/ogg" default/>
  </video>
or something similar?

The first supported <source /> is used (from the spec).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.