HTML5 video tag in chrome - wmv

52,567

To the best of my knowledge, Chrome doesn't support WMV. Opera, Firefox and Chrome support Ogg Theora+Vorbis, while Chrome and Safari support MPEG-4 H.264+AAC.

Your markup needs a bit of fixing. There is no codecs attribute, use the type attribute instead. Also, you usually don't need the media attribute at all. Here's your cleaned up markup:

<video controls>
  <source type="video/ogg; codecs=theora,vorbis" src="video.ogv">
  <source src="video.wmv">
  Your browser doesn't support video, you may download the
  video instead: <a href="video.ogv">Ogg</a>
</video>

The only browser that might be able to play WMV is Opera on Linux (if you happen to have the right GStreamer plugins installed). That's not very useful, so you should probably just not use WMV with <video> at all.

You might find this useful reading: Everything you need to know about HTML5 video and audio.

Disclaimer: I work on <video> for Opera.

Share:
52,567
elcuco
Author by

elcuco

SOreadytohelp, yea, I don't like Reggae (I love it). But not twitter.

Updated on January 14, 2020

Comments

  • elcuco
    elcuco over 4 years

    I need to make a page which displays a video. Firefox and and Opera support the OGG format, no problem there. Chrome is ... "stupid" and does not recognize OGG.

    Does Chrome on Windows know how to handle WMV? I already have them encoded, and no I cannot recode new videos since the media is limited in spaced (CDROM).

    My code currently looks like this (and not working in chrome)

    <video controls>
    <source codecs="theora, vorbis" media="video/ogg" src="video.ogv" />
    <source media="video/x-ms-wmv" src="video.wmv" />
    Please install a new browser, or just get out
    </video>
    

    Note that I am missing a codec entry, does anyone know what I need to put there?