Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video is not actually getting cached? #32

Open
ajkerfaisal opened this issue Mar 22, 2020 · 1 comment
Open

Video is not actually getting cached? #32

ajkerfaisal opened this issue Mar 22, 2020 · 1 comment

Comments

@ajkerfaisal
Copy link

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.

@ealeksandrov
Copy link

Please check #29 (comment) and #10.

CachingPlayerItem only gives convenient delegate access to player data, it doesn't do any of saving/caching/reusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants