AVAssetResourceLoader stops loading data
I am implementing my own class AVAssetResourceLoaderDelegate
for previewing and caching my videos.
ie
AVURLAsset *asset ;
assetLoader = [[AssetLoaderDelegate alloc] init];
assetLoader.fileUrl = self.videoURL;
asset = [AVURLAsset URLAssetWithURL:[self videoURL:self.videoURL WithCustomScheme:@"streaming"] options:nil];
[asset.resourceLoader setDelegate:assetLoader queue:dispatch_get_main_queue()];
Where AssetLoaderDelegate is a custom class that conforms to the protocol AVAssetResourceLoaderDelegate
.
Works as expected. However, the problem I am running into is that sometimes I need to switch from the video player to a different kind and therefore stop the bootloader from loading data, but I have not found one to stop it. [self.player replaceCurrentItemWithPlayerItem:nil];
cant obviously handle this i guess.
How do I stop AVAssetResourceLoaderDelegate
downloading data?
source to share
No one has answered this question yet
Check out similar questions: