9

I have a Java Servlet that loads File objects from the filesystem and serves them to a client-side javascript web player. Those files are video/mp4 type. When the web client-side javascript player requests a section of the video that is different from the start, it sends a request for partial content to the web server with the header Range. For example

 Range: bytes = 500-900/1000

How can I properly select the section of the File object corresponding to that range and what headers should I put in my response so as it is valid for use ?

Nishant
  • 54,584
  • 13
  • 112
  • 127
John Papastergiou
  • 999
  • 2
  • 14
  • 29
  • 3
    My answer to this question was deleted by moderator for some reason, but I think the article link it was providing is still relevant: http://balusc.omnifaces.org/2009/02/fileservlet-supporting-resume-and.html – Konstantin V. Salikhov Apr 27 '17 at 05:53
  • Possible duplicate of [How to Implement HTTP byte-range requests in Spring MVC](http://stackoverflow.com/questions/28427339/how-to-implement-http-byte-range-requests-in-spring-mvc) – MT0 May 04 '17 at 14:49

0 Answers0