I'm doing some experiments with client-side video manipulation and need to be able to load up a subset of a file via XMLHttpRequest to implement streaming and seeking.
In theory I can do this by adding a 'Range' header with a byte range:
xhr.setRequestHeader("range", "bytes=" + position + "-" + endPosition);
However for a cross-domain request this triggers a 'preflight' OPTIONS request to ask the server if it's ok to send 'Range' headers -- that OPTIONS hit includes this request header:
Access-Control-Allow-Headers: Range
the OPTIONS *response* needs to include the same line back to us, or the browser will refuse to make an actual GET request including the 'Range' header.
Without the Range header this leaves me only able to fetch the entire file into memory at once, which won't be suitable for large video files.
Version: wmf-deployment
Severity: normal