Class

AVURLAsset

A concrete subclass of AVAsset that's used to initialize an asset from a local or remote URL.

Declaration

class AVURLAsset : AVAsset

Topics

Creating a URL Asset

init(url: URL, options: [String : Any]? = nil)

Initializes an asset that models the media resource found at the specified URL.

Accessing the URL

var url: URL

The URL with which the asset was initialized.

Assisting with Resource Loading

var resourceLoader: AVAssetResourceLoader

The resource loader associated with the asset.

Finding Compatible Tracks

func compatibleTrack(for: AVCompositionTrack) -> AVAssetTrack?

Returns an asset track from which any time range can be inserted into a given composition track.

Getting Supported Media Types

class func audiovisualMIMETypes() -> [String]

Returns an array of the MIME types the AVURLAsset class supports.

class func audiovisualTypes() -> [AVFileType]

Returns an array of the file types the AVURLAsset class supports.

class func isPlayableExtendedMIMEType(String) -> Bool

Returns a Boolean value that indicates whether the asset is playable with the given codec(s) and container type.

Working with Offline Assets

var assetCache: AVAssetCache?

The asset’s associated asset cache, if it exists.

Working with Encrypted Content

var mayRequireContentKeysForMediaDataProcessing: Bool

Allows a URL asset to be added as a content key recipient to a content key session.

Relationships

Inherits From

See Also

Asset Retrieval

class AVAssetDownloadURLSession

A URL session used to support the creation and execution of asset download tasks.

class AVAssetResourceLoader

An object that mediates resource requests from a URL asset.

class AVAssetResourceLoadingRequest

An object that encapsulates information about a resource request issued by a resource loader object.

var response: URLResponse?

The URL response for the loading request.

class AVAssetResourceRenewalRequest

An object that encapsulates information about a resource request issued by a resource loader to renew a previously issued request.

class AVAssetResourceLoadingContentInformationRequest

A query used to get essential information about a resource referenced by an asset resource loading request.

class AVAssetResourceLoadingDataRequest

An object used to request data from a resource referenced by an asset resource loading request.

class AVAssetDownloadStorageManager

A manager of policies used to automatically purge downloaded assets.

class AVAssetDownloadStorageManagementPolicy

A set of properties that defines a policy to automatically purge downloaded assets.

class AVMutableAssetDownloadStorageManagementPolicy

A mutable set of properties that defines a policy to automatically purge downloaded assets.