I want embed MP4 video (H.264) in a way that should work cross browser but uses html5 if available for better performance. Firefox should fall back to Flash as long as I don't provide an WebM version.
The problem:
Firefox downloads the whole video before starting to play, while Chrome and other browsers play while still downloading.
That's what I did:
<video poster="poster.jpg" preload="auto" autobuffer autoplay loop >
<source src="video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
</video>
To implement the Flash fallback i used jMediaElement:
jQuery(function(){
jQuery('video').jmeEmbed();
});
I tried some alternatives to jMediaElement, but I had problems hiding the controls and using autoplay/loop in the flash player. jMediaElement uses JWplayer as fallback and all these things just work when declared in the video tag.
The dev version is currently at: http://acn.lws-service.de/
The video is delivered with MIME type "video/mp4" as it is supposed to. The problem might be related to JWplayer/jMediaElement - or could it be the video (encoding) itself?
An alternative to jMediaElement which still allows the video to autoplay, loop and hide the controls would be appreciated as well.