Http pseudo streaming in IE11

I have several videos, and I need to be able to search for various points in them without loading all the videos up to this point. So far, I have worked fine in Firefox and Chrome using the html5 tag using NodeJS and the vid-streamer module. However, IE 11 insists on downloading the whole video, I can’t get it to skip ahead until it loads to the point where I want to play. Does IE support partial content, and is there any trick to launch it? Or is he already requesting it with one of the other headers (GetContentFeatures.DLNA.ORG ??) and my server does not understand?

An example of a firefox header header is that it sends a new request whenever you try to find a key element that is the range header that it sends even for the original request (bytes = 0 -):

Accept video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5 Accept-Language en-us,en;q=0.5 Connection keep-alive Cookie connect.sid=... Host ... Range bytes=75661312- Referer ... User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 

And server response:

 Accept-Ranges bytes Cache-Control public Connection keep-alive Content-Disposition inline; filename=video.webm; Content-Length 12509 Content-Range bytes 75661312-75673820/75673821 Content-Transfer-Encoding binary Content-Type video/webm Date Wed, 03 Sep 2014 21:42:08 GMT Last-Modified Thu, 28 Aug 2014 15:05:24 GMT Pragma public Server VidStreamer.js/0.1.4 Vary Accept-Encoding X-Powered-By Express status 206 Partial Content 

IE11 does not send a range:

 Request GET /videos/video.mp4 HTTP/1.1 Accept */* If-Modified-Since Mon, 16 Nov 2009 14:05:45 GMT User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko Referer ... GetContentFeatures.DLNA.ORG 1 Pragma getIfoFileURI.dlna.org Accept-Language en-US Accept-Encoding gzip, deflate Host ... Connection Keep-Alive Cookie ... 

And the server (reasonably, I think) answers all the videos and 200 OK instead of 206 partial content:

 Response HTTP/1.1 200 OK X-Powered-By Express Vary Accept-Encoding Cache-Control public Connection keep-alive Content-Type video/mp4 Content-Disposition inline; filename=video.mp4; Pragma public Last-Modified Mon, 16 Nov 2009 14:05:45 GMT Content-Transfer-Encoding binary Content-Length 36373917 Server VidStreamer.js/0.1.4 Date Wed, 03 Sep 2014 21:38:42 GMT 
+1
html5-video
source share
2 answers

Figured it out. IE11 supports pseudo-stream, but it needs the header "Accept-Ranges: bytes" before it wants to request a range, so the server must respond to it regardless of whether it really sends a range of bytes. I had to change my vid-streamer module to do this.

Caution: I have no idea which browsers support video tags, but not byte ranges, so I can’t say for sure that it won’t break somewhere, but it looks like everything should be fine ...

+4
source

I had the same problem until after some test I realized that the original request from IE / Edge does not include the range header. If you respond with the appropriate source content, a file size equal to your Content-Length header, suppose you just want to send the whole file in one go. If you don’t get the range header, you better choose some content length that is less than the file size. I chose 1Mb, but that doesn't really matter, I think.

0
source

All Articles