Why does the iPhone request an .m3u8 playlist file

2019-06-27 04:58发布

Why does the iPhone request an .m3u8 playlist file 4 times? And, is it possible to get it to request it only once?

The requests are performed as follows:

  1. The first one is a full request.
  2. The second one is a byte range request with a range of 0-1.
  3. The third is another byte range request for the complete file.
  4. The final request is again a complete request.

Note: that the iPhone kills the connection on these requests so not all of them complete to the end.

However, there is a lot of unnecessary requests in my opinion and I would like to know why the iPhone does this and whether or not it's possible to get the iPhone to request the original playlist only once?

2条回答
不美不萌又怎样
2楼-- · 2019-06-27 05:32

I would guess the client is sampling the file and measuring client connection speeds by downloading byte ranges from the file(s). Without source or further documentation we can't know for sure.

查看更多
萌系小妹纸
3楼-- · 2019-06-27 05:49

It sounds like the iPhone is checking for changes in your m3u8 file, to see if you have added any .ts files. It does this because it thinks your m3u8 file is a live stream. If you have a fixed length (VoD) stream, try putting

#EXT-X-ENDLIST

at the end of your m3u8 file

查看更多
登录 后发表回答