5
votes

I'm working in an app where I'm able to play a HLS m3u8 playlist of a streaming radio (audio only) without any problem using an instance of AVPlayer. Using Charles I can see how the playlist is updated properly in a normal pace (each 9-10 seconds, which takes one media segment file). When I perform a seekToTime: (back in time), the player success playing the stream from when I want to, but in Charles I observe how the player starts dowloading a huge amount of media segment files, consuming a lot of data. It seems that the player downloads all the media segment files until that time and then keeps again with the normal behaviour.

I understand that the correct behaviour would be to download the media segment file for the time I'm seeking to, start playing it and then download constantly 1 or 2 media segment files each 9-10 seconds, as it does when I play the stream without timeshift.

My question is if this is a normal behaviour, or if something could be wrong with my m3u8 playlist or the client implementation. Anyone could help me to clarify this?

UPDATED: I can confirm this doesn't happen in iOS 7, so it seems to be a bug introduced by iOS 8.

1
Try the same using [Apple's Stream Sample: Bip Bop: devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8Till
I did, and it behaves the same. Also I created a new project and an instance of AVPlayer initialise with three different streams (including the Apple's one), and used seekToDate: to three minutes back. The result is the same: performing that method you can see how it success, but it downloads very quickly a lot of media segment files, so I guess is the normal behaviour, at least using AVPlayer for that.Daniel

1 Answers

2
votes

I've been told by Apple that this is not a bug, but a feature. They've made the buffer bigger since iOS 8.