SYMPTOMS
The other day we deployed a new site to the production servers only to find our video player was bugging out. Specifically in Firefox, it seemed that the file size and video length was not being interpreted correctly. Load complete events and video play complete events were being fired prematurely, if not instantaneously. It other browsers the bytes loaded of the net stream never updated, but the video played fine. It worked perfectly in our dev environment and had passed QA, but for some reason broke when deployed to production. This lead us to believe that it was environmental and differences between the server configurations were at fault.
CAUSE
I’ve seen this type of thing before and wrote about it here. Using an HTTP proxy (I use Charles), I looked at the differences in responses to the F4V requests from the two servers. Both were returning a “plain-text” mime-type. Not a good thing, but still did not explain the differences in behavior. The only difference was the production server was using gzip compression for F4V files. I did a quick search on the web and found only two documented cases of malfunctioning F4Vs and gzip compression, so I figured it was worth writing about.
SOLUTION
The solution is to exclude F4Vs from gzip compression in your apache configuration. Unfortunately, we don’t have administration rights to out client’s servers, so we defaulted to the lower quality and slightly larger file size of FLV, which fixed the issue.
REFERENCES


