Why does the iPhone request the .m3u8 playlist file 4 times?

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

Requests are performed as follows:

  • The first is a complete request.
  • The second is a request for a range of bytes with a range of 0-1.
  • The third is another byte range request for the complete file.
  • The last query is again a complete query.

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

However, in my opinion, there are many unnecessary queries, and I would like to know why the iPhone does this and can the iPhone force the iPhone to query the source list only once?

+4
source share
2 answers

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

#EXT-X-ENDLIST 

at the end of your m3u8 file

+1
source

I would suggest that the client fetch the file and measures the connection speed with the client, loading byte ranges from the file (s). Without a source or additional documentation, we cannot know for sure.

0
source

Source: https://habr.com/ru/post/1342332/


All Articles