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?

+3
ios objective-c avfoundation avasset


source to share


No one has answered this question yet

Check out similar questions:

1300
Transferring data between view controllers
715
Loaded tip, but no "view" output set
372
Master data: the fastest way to delete all instances of an object
12
Play h.264 video video sockets with stream in iOS using AVFoundation
eleven
AVPlayer loads AVAsset from a file that is added simultaneously by an external source (for macOS and iOS)
ten
Streaming video while loading iOS
7
How do I use AVAssetResourceLoader?
1
Does AVPlayer re-extract the video again?
0
Using AVFoundation I can capture the last 5 seconds when the user presses the button
0
Lose Youtube player when it goes out of sight due to reusable table cells



All Articles
Loading...
X
Show
Funny
Dev
Pics