Created
November 18, 2010 04:25
-
-
Save lindsayevans/704625 to your computer and use it in GitHub Desktop.
HTML5 <video> bug in FF3.6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tested in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729) | |
The following HTML: | |
<video controls> | |
<source src="foo.ogv" type='video/ogg; codecs="theora, vorbis"'> | |
</video> | |
Will cause Firefox to make an extra HTTP request for the URL '/' (verified in Firebug's Net panel & Live HTTP Headers extension) | |
Adding a 'poster' attribute to the video element will fix this, but is sometimes not desirable/possible. | |
- An empty poster attribute (poster="") will not work | |
- An poster attribute of # will not work | |
- An poster attribute of 'about:blank' WILL work in FF (displays first video frame), but displays a blank screen in Chrome | |
Quick, hacky fix in jQuery (outside of document.ready): | |
if(jQuery.browser.mozilla){ | |
jQuery('video').attr('poster', 'about:blank'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment