AVPlayer empties buffer when app is in background

340 Views Asked by At

I'm using AVPlayer to play HLS streams. While playing, the AVPlayer buffer's. If I put the app in background, AVPlayer pauses, which is fine. That's what I want. But the problem is that the AVPlayer buffered data is lost. So the user has to wait until AVPlayer buffers again before it can start playing.

Is there a way to stop AVPlayer from dumping the buffered data when put in background? I need it to be able to immediately resume when coming back to foreground. Thanks.

0

There are 0 best solutions below