Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set AVPlayer buffer empty in ios

I am using AVPlayer for play Video in my app.

In my app, I have added functionality for play next/previous video so how can i set empty buffer.

so, if any one have solution for this help me.

like image 594
Nimisha Ranipa Avatar asked Oct 30 '22 08:10

Nimisha Ranipa


1 Answers

Try with

[self.player.currentItem cancelPendingSeeks];
[self.player.currentItem.asset cancelLoading];
like image 167
jose920405 Avatar answered Nov 15 '22 07:11

jose920405