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

is Disk cache available ? #3

Closed
SureshSc opened this issue May 10, 2018 · 4 comments
Closed

is Disk cache available ? #3

SureshSc opened this issue May 10, 2018 · 4 comments

Comments

@SureshSc
Copy link

SureshSc commented May 10, 2018

I wanted to save the cache to disk(Document directory) and when want to play the same url it should take from disk and then should play.

My scenarios:

I wanted to download 3sec of video and should save in cache, when user click play in AVPlayer, disk cached (3sec) video should play first and the remaining video should play from network.

@shashank-rps
Copy link

@SureshSc Did you manage to achieve this functionality?

@SureshSc
Copy link
Author

SureshSc commented Aug 8, 2018

@shashank-rps not yet.

@vdugnist
Copy link
Owner

@SureshSc sorry for late response. To achieve this I can add data source method to loader delegate that can return NSData for requested URL and range. But if you want instantaneous start you should also give resource loader content-type, content length, and byteRangeAccessSupported flag.

Have you thought about caching first seconds with AVPlayer and holding AVAsset objects in memory?

@vdugnist
Copy link
Owner

will track progress in this issue

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

3 participants