Package apple.avfoundation.protocol
Interface AVAssetDownloadDelegate
-
- All Superinterfaces:
NSURLSessionDelegate,NSURLSessionTaskDelegate
public interface AVAssetDownloadDelegate extends NSURLSessionTaskDelegate
[@protocol] AVAssetDownloadDelegate Delegate methods to implement when adopting AVAssetDownloadTask. API-Since: 9.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface apple.foundation.protocol.NSURLSessionDelegate
NSURLSessionDelegate.Block_URLSessionDidReceiveChallengeCompletionHandler
-
Nested classes/interfaces inherited from interface apple.foundation.protocol.NSURLSessionTaskDelegate
NSURLSessionTaskDelegate.Block_URLSessionTaskDidReceiveChallengeCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskNeedNewBodyStream, NSURLSessionTaskDelegate.Block_URLSessionTaskNeedNewBodyStreamFromOffsetCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskWillBeginDelayedRequestCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskWillPerformHTTPRedirectionNewRequestCompletionHandler
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidURLSessionAggregateAssetDownloadTaskDidCompleteForMediaSelection(@NotNull NSURLSession session, @NotNull AVAggregateAssetDownloadTask aggregateAssetDownloadTask, @NotNull AVMediaSelection mediaSelection)URLSession:aggregateAssetDownloadTask:didCompleteForMediaSelection: Method called when a child AVAssetDownloadTask completes.default voidURLSessionAggregateAssetDownloadTaskDidLoadTimeRangeTotalTimeRangesLoadedTimeRangeExpectedToLoadForMediaSelection(@NotNull NSURLSession session, @NotNull AVAggregateAssetDownloadTask aggregateAssetDownloadTask, CMTimeRange timeRange, @NotNull NSArray<? extends NSValue> loadedTimeRanges, CMTimeRange timeRangeExpectedToLoad, @NotNull AVMediaSelection mediaSelection)URLSession:aggregateAssetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad:forMediaSelection: Method to adopt to subscribe to progress updates of an AVAggregateAssetDownloadTaskdefault voidURLSessionAggregateAssetDownloadTaskWillDownloadToURL(@NotNull NSURLSession session, @NotNull AVAggregateAssetDownloadTask aggregateAssetDownloadTask, @NotNull NSURL location)URLSession:aggregateAssetDownloadTask:willDownloadToURL: Method called when the aggregate download task determines the location this asset will be downloaded to.default voidURLSessionAssetDownloadTaskDidFinishDownloadingToURL(@NotNull NSURLSession session, @NotNull AVAssetDownloadTask assetDownloadTask, @NotNull NSURL location)URLSession:assetDownloadTask:didFinishDownloadingToURL: Sent when a download task that has completed a download.default voidURLSessionAssetDownloadTaskDidLoadTimeRangeTotalTimeRangesLoadedTimeRangeExpectedToLoad(@NotNull NSURLSession session, @NotNull AVAssetDownloadTask assetDownloadTask, CMTimeRange timeRange, @NotNull NSArray<? extends NSValue> loadedTimeRanges, CMTimeRange timeRangeExpectedToLoad)URLSession:assetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad: Method to adopt to subscribe to progress updates of an AVAssetDownloadTask.default voidURLSessionAssetDownloadTaskDidResolveMediaSelection(@NotNull NSURLSession session, @NotNull AVAssetDownloadTask assetDownloadTask, @NotNull AVMediaSelection resolvedMediaSelection)URLSession:assetDownloadTask:didResolveMediaSelection: Method called when the media selection for the download is fully resolved, including any automatic selections.default voidURLSessionAssetDownloadTaskWillDownloadVariants(@NotNull NSURLSession session, @NotNull AVAssetDownloadTask assetDownloadTask, @NotNull NSArray<? extends AVAssetVariant> variants)URLSession:assetDownloadTask:willDownloadVariants: Sent when a download task has completed the variant selection.-
Methods inherited from interface apple.foundation.protocol.NSURLSessionDelegate
URLSessionDidBecomeInvalidWithError, URLSessionDidFinishEventsForBackgroundURLSession, URLSessionDidReceiveChallengeCompletionHandler
-
Methods inherited from interface apple.foundation.protocol.NSURLSessionTaskDelegate
URLSessionDidCreateTask, URLSessionTaskDidCompleteWithError, URLSessionTaskDidFinishCollectingMetrics, URLSessionTaskDidReceiveChallengeCompletionHandler, URLSessionTaskDidReceiveInformationalResponse, URLSessionTaskDidSendBodyDataTotalBytesSentTotalBytesExpectedToSend, URLSessionTaskIsWaitingForConnectivity, URLSessionTaskNeedNewBodyStream, URLSessionTaskNeedNewBodyStreamFromOffsetCompletionHandler, URLSessionTaskWillBeginDelayedRequestCompletionHandler, URLSessionTaskWillPerformHTTPRedirectionNewRequestCompletionHandler
-
-
-
-
Method Detail
-
URLSessionAssetDownloadTaskDidFinishDownloadingToURL
default void URLSessionAssetDownloadTaskDidFinishDownloadingToURL(@NotNull @NotNull NSURLSession session, @NotNull @NotNull AVAssetDownloadTask assetDownloadTask, @NotNull @NotNull NSURL location)URLSession:assetDownloadTask:didFinishDownloadingToURL: Sent when a download task that has completed a download. Unlike NSURLSessionDownloadDelegate, the delegate should NOT move the file from this directory after it has been called. Downloaded assets must remain at the system provided URL. URLSession:task:didCompleteWithError: will still be called.- Parameters:
session- The session the asset download task is on.assetDownloadTask- The AVAssetDownloadTask whose downloaded completed.location- The location the asset has been downloaded to. API-Since: 10.0
-
URLSessionAssetDownloadTaskDidLoadTimeRangeTotalTimeRangesLoadedTimeRangeExpectedToLoad
default void URLSessionAssetDownloadTaskDidLoadTimeRangeTotalTimeRangesLoadedTimeRangeExpectedToLoad(@NotNull @NotNull NSURLSession session, @NotNull @NotNull AVAssetDownloadTask assetDownloadTask, CMTimeRange timeRange, @NotNull @NotNull NSArray<? extends NSValue> loadedTimeRanges, CMTimeRange timeRangeExpectedToLoad)URLSession:assetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad: Method to adopt to subscribe to progress updates of an AVAssetDownloadTask.- Parameters:
session- The session the asset download task is on.assetDownloadTask- The AVAssetDownloadTask which is being updated.timeRange- A CMTimeRange indicating the time range loaded since the last time this method was called.loadedTimeRanges- A NSArray of NSValues of CMTimeRanges indicating all the time ranges loaded by this asset download task.timeRangeExpectedToLoad- A CMTimeRange indicating the single time range that is expected to be loaded when the download is complete. API-Since: 9.0
-
URLSessionAssetDownloadTaskDidResolveMediaSelection
default void URLSessionAssetDownloadTaskDidResolveMediaSelection(@NotNull @NotNull NSURLSession session, @NotNull @NotNull AVAssetDownloadTask assetDownloadTask, @NotNull @NotNull AVMediaSelection resolvedMediaSelection)URLSession:assetDownloadTask:didResolveMediaSelection: Method called when the media selection for the download is fully resolved, including any automatic selections.- Parameters:
session- The session the asset download task is on.assetDownloadTask- The AVAssetDownloadTask which is being updated.resolvedMediaSelection- The resolved media selection for the download task. For the best chance of playing back downloaded content without further network I/O, apply this selection to subsequent AVPlayerItems. API-Since: 9.0
-
URLSessionAggregateAssetDownloadTaskDidCompleteForMediaSelection
default void URLSessionAggregateAssetDownloadTaskDidCompleteForMediaSelection(@NotNull @NotNull NSURLSession session, @NotNull @NotNull AVAggregateAssetDownloadTask aggregateAssetDownloadTask, @NotNull @NotNull AVMediaSelection mediaSelection)URLSession:aggregateAssetDownloadTask:didCompleteForMediaSelection: Method called when a child AVAssetDownloadTask completes.- Parameters:
session- The session the aggregate asset download task is on.aggregateAssetDownloadTask- The AVAggregateAssetDownloadTask.mediaSelection- The AVMediaSelection which is now fully available for offline use. API-Since: 11.0
-
URLSessionAggregateAssetDownloadTaskDidLoadTimeRangeTotalTimeRangesLoadedTimeRangeExpectedToLoadForMediaSelection
default void URLSessionAggregateAssetDownloadTaskDidLoadTimeRangeTotalTimeRangesLoadedTimeRangeExpectedToLoadForMediaSelection(@NotNull @NotNull NSURLSession session, @NotNull @NotNull AVAggregateAssetDownloadTask aggregateAssetDownloadTask, CMTimeRange timeRange, @NotNull @NotNull NSArray<? extends NSValue> loadedTimeRanges, CMTimeRange timeRangeExpectedToLoad, @NotNull @NotNull AVMediaSelection mediaSelection)URLSession:aggregateAssetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad:forMediaSelection: Method to adopt to subscribe to progress updates of an AVAggregateAssetDownloadTask- Parameters:
session- The session the asset download task is on.aggregateAssetDownloadTask- The AVAggregateAssetDownloadTask.timeRange- A CMTimeRange indicating the time range loaded for the media selection being downloaded.loadedTimeRanges- A NSArray of NSValues of CMTimeRanges indicating all the time ranges loaded for the media selection being downloaded.timeRangeExpectedToLoad- A CMTimeRange indicating the single time range that is expected to be loaded when the download is complete for the media selection being downloaded.mediaSelection- The media selection which has additional media data loaded for offline use. API-Since: 11.0
-
URLSessionAggregateAssetDownloadTaskWillDownloadToURL
default void URLSessionAggregateAssetDownloadTaskWillDownloadToURL(@NotNull @NotNull NSURLSession session, @NotNull @NotNull AVAggregateAssetDownloadTask aggregateAssetDownloadTask, @NotNull @NotNull NSURL location)URLSession:aggregateAssetDownloadTask:willDownloadToURL: Method called when the aggregate download task determines the location this asset will be downloaded to. This URL should be saved for future instantiations of AVAsset. While an AVAsset already exists for this content, it is advisable to re-use that instance.- Parameters:
session- The session the aggregate asset download task is on.aggregateAssetDownloadTask- The AVAggregateAssetDownloadTask.location- The file URL this task will download media data to. API-Since: 11.0
-
URLSessionAssetDownloadTaskWillDownloadVariants
default void URLSessionAssetDownloadTaskWillDownloadVariants(@NotNull @NotNull NSURLSession session, @NotNull @NotNull AVAssetDownloadTask assetDownloadTask, @NotNull @NotNull NSArray<? extends AVAssetVariant> variants)URLSession:assetDownloadTask:willDownloadVariants: Sent when a download task has completed the variant selection.- Parameters:
session- The session the asset download task is on.assetDownloadTask- The asset download task.variants- The variants chosen. Depends on the environmental condition when the download starts. API-Since: 15.0
-
-