4

I have web server supporting HTTP Range headers for video content and for Web Browsers and iOS works great, but after starting testing on Android application using basic VideoView I found that application not making request with Range: 0- HTTP header.

I've tried to response with this headers for the beginning, based on HTTP Range header specifications. Sending 2 bytes of file header then client will send range for response.

Accept-Ranges: bytes
Connection: keep-alive
Pragma: public
Content-Type: video/mp4
Content-Length: 2
Content-Range: 0-1/34568

On iOS and Web browsers working with this very well, but Android VideoView not sending Range header at all.

How to make this work for VideoView ?

Alexis Wilke
  • 19,179
  • 10
  • 84
  • 156
  • `Range: ...` support is not mandatory. Also, if the `VideoView` has not cached the data yet, using `Range` may be considered pointless by that software implementation. For sure, using `Range: 0-` is just the same as a plain `GET` without the `Range` header. Forcing a `Range` reply when the client did not ask for it is likely to fail too. – Alexis Wilke Sep 24 '19 at 01:03

0 Answers0