Closed SureshSc closed 5 years ago
@SureshSc Did you manage to achieve this functionality?
@shashank-rps not yet.
@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?
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.