justdan0227 justdan0227 - 5 months ago 58
iOS Question

iOS AVPlayer cancel buffering

If I load an

with a file from a host with

[AVPlayer playerWithPlayerItem:playerItem];

And the "buffering" takes longer than the user wants, how do I allow them to cancel it?


So the correct answer is @Che with:

If you will call [self.player replaceCurrentItemWithPlayerItem:nil]; buffering stops. – Che Oct 13 at 14:36

and you do so on the observer listening for the status update from the playerWithPlayerItem. Thanks All!