Closed GoogleCodeExporter closed 9 years ago
I think that your problem is almost certainly due to IE8's HTML parsing. The
HTML code for your video tag is
being munged before being inserted into the page.
Try doing it this way instead:
var vid = $("<video/>").attr("class", "video").attr("poster",
"cat.jpg").attr("width", "352").attr("height",
"264").attr("controls", "controls").attr("preload", "auto");
var src1 = $("<source/>").attr("src", "cat.ogv").attr("type", 'video/ogg;
codecs="theora, vorbis"');
var src2 = $("<source/>").attr("src", "cat.mp4").attr("type", 'video/mp4;
codecs="avc1.42E01E, mp4a.40.2"');
vid.append(src1).append(src2);
$("#wrap").append(vid);
This way, IE is left with no ambiguity as to how the HTML should be parsed. In
your case, the HTML is being
parsed by IE as six different nodes with no nesting, which is complete garbage.
N.B. I haven't testing the JS, but you should get the general idea. Use jQuery
DOM methods to create the HTML
rather than passing in a HTML string.
Original comment by david.et...@gmail.com
on 21 Apr 2010 at 11:13
This was almost certainly a bug in IE8, and it's cluttering up the issues list.
Original comment by david.et...@gmail.com
on 7 May 2010 at 10:38
Original issue reported on code.google.com by
bennyb...@gmail.com
on 21 Apr 2010 at 12:18