Video streaming with HTML 5 via node.js
I was able to get this to work with some help from the nodejs forums:
http://groups.google.com/group/nodejs/browse_thread/thread/8339e0dc825c057f/822b2dd48f36e890
Highlights from the Google Groups thread:
Google chrome is known to first make a request with the range 0-1024 and then request the range "1024-".
response.end(file.slice(start, chunksize), "binary");
Then:
I was able to get the video to play no problems in firefox by setting the "connection" header to "close"
Then:
Seems that you are incorrectly computing the content-length:
var chunksize = (end-start)+1;
If start is 0 and end is 1, in your case chunksize is 2, and it should be 1.
I know this is a really old question, but as Google seems to like it I thought it would be worth pointing out that I wrote a Node.js video streaming module (Github, or via NPM) that's hopefully worth a look too.