I am currently creating a video streaming service where the video is transcoded in pieces of 1 MB each. The HTML5 player Firefox, Chrome, and IE try their best to request partial content (by adding the Range header to their request). Unfortunately, most of the time this header looks like this:
Range:bytes=0-
I do not want to return the full content, but only 1 MB of content, so I am returning this:
Content-Range:bytes 0-1048575/5074944
Now Chrome accepts this in full and continues to request partial content until it reaches the total length. However, Firefox only makes one request, which contains partial content, not full. Firefox thinks this is full content, and therefore, the full video does not play, only part of it. How do I get the same behavior in Firefox as in Chrome? I tried returning 416 Range not Satisfiable, but both Chrome and Firefox seem to be requesting after receiving this status code.
source share