CachingPlayerItem
CachingPlayerItem copied to clipboard
Video is not actually getting cached?
I have no problem playing the video using this code
let url = URL(string: "i_am_super_duper_url_for_a_mp4_file")!
let playerItem = CachingPlayerItem(url: url)
player = AVPlayer(playerItem: playerItem)
player.automaticallyWaitsToMinimizeStalling = false
player.play()
Let's say I have opened the app and played the whole video once. Then I close the app and reopen it without any wifi and mobile data. And the video is not getting played. I confirm I tested this in a real device and not a simulator.
I get this in the console:
NSLocalizedDescription=The Internet connection appears to be offline.
I also tried and no success
CachingPlayerItem(url: url, customFileExtension: "mp4")
Please let me know if I misunderstood CachingPlayerItem or missed anything.
Please check https://github.com/neekeetab/CachingPlayerItem/issues/29#issuecomment-578122754 and #10.
CachingPlayerItem
only gives convenient delegate access to player data, it doesn't do any of saving/caching/reusing.