Video Trouble

I’m trying to build a cross-browser video player, but it won’t work in Firefox 3.6 or Opera 10.6.

When I took out the various “type” attributes, then it started working fine. I’m pretty sure I’d want to keep the types in, so what else am I doing wrong? If I encoded the videos with something different from what I specify in the type (that is, if I messed up but didn’t know it), would that keep the video from playing?

Instead of

<[COLOR="Blue"]video[/COLOR] height="360" width="640" autoplay="" controls="" tabindex="0">


<[COLOR="Red"]embed[/COLOR] height="360" width="640" autoplay="" controls="" tabindex="0">

When I change it to an embed, it just jumps straight to the Flowplayer Flash fallback. I’d like to utilize the native video players in the respective browsers, if I could.

I’m an idiot.

I like to enclose my HTML attributes in double quotes. So I had the type attribute written out like so:

<source src="x.mp4" type="video/mp4; codecs='avc1.42E01E, mp4a.40.2'" />

It turns out FF and Opera don’t like that. They refuse to acknowledge the existence of different video sources unless the types are written out like this:

<source src="x.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />

You catch that? Single quotes around the whole type, double quotes around the codecs. Once I did that, everything started working fine. :stuck_out_tongue:

Yeah, the spec for the codecs=“” MIME parameter is anal and requires double quotes. :frowning: