AVURLAsset is a concrete subclass of AVAsset that you use to initialize an asset from a local or remote URL.


Creating an 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.

Accessing the Resource Loader

var resourceLoader: AVAssetResourceLoader

The resource loader associated with the asset.

Finding Compatible Tracks

func compatibleTrack(for: AVCompositionTrack)

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

Getting Supported Media Types

class func audiovisualMIMETypes()

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

class func audiovisualTypes()

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

class func isPlayableExtendedMIMEType(String)

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 AVURLAsset to be added as a content key recipient to an AVContentKeySession.



Inherits From