neekeetab / CachingPlayerItem

Play and cache media content simultaneously on your iOS device
MIT License
520 stars 89 forks source link

Do we need to remove cached items ? If yes how? #43

Open mohamedrafi-rapid opened 1 year ago

mohamedrafi-rapid commented 1 year ago

Please help to clear the caches... Thanks in advance

neekeetab commented 1 year ago

There's no caching done by CachingPlayerItem. It only gives you the raw Data via a delegate, and it's up to you how to cache it (and how to delete it from your cache). If you're running low on memory, try to remove any references to the instances of CachingPlayerItem

mohamedrafi-rapid commented 1 year ago

@neekeetab Thanks for your reply. Can you pls do one more help? I want to download only 20 percent of each item. How can we do that?

mohamedrafi-rapid commented 1 year ago

I am implemeting a short video feature. So I am trying to cache only the nearest times only (back and forth). So when I call caching , it starts again each time

neekeetab commented 1 year ago

There's no such functionality. My guess is you will need to reimplement the loading. You can get the total size of a file and calculate 20%, then cancel download once you reach the threshold