Contents

makeAssetDownloadTask(asset:assetTitle:assetArtworkData:options:)

Creates a download task to download the asset.

Declaration

func makeAssetDownloadTask(asset URLAsset: AVURLAsset, assetTitle title: String, assetArtworkData artworkData: Data?, options: [String : Any]? = nil) -> AVAssetDownloadTask?

Parameters

  • URLAsset:

    The HTTP Live Streaming asset to download.

  • title:

    A human readable title for this asset in the user’s preferred language. The system displays this value in the usage pane of the Settings app.

  • artworkData:

    Optional artwork data for this asset. The system displays the image in the usage pane of the Settings app.

  • options:

    Configures custom behavior on the download task. You must provide an options dictionary to download nondefault media selections for HLS assets.

Return Value

A new download task.

Discussion

This method may return nil if you call it on an invalidated session.

Topics

Download option keys

See Also

Creating download tasks