Initializer

init(asset:)

Initializes a new player item for a given asset.

Declaration

convenience init(asset: AVAsset)

Parameters

asset

The AVAsset to be played.

Return Value

A new player item, initialized to play asset.

See Also

Creating a Player Item

init(url: URL)

Initializes a player item with a given URL.

init(asset: AVAsset, automaticallyLoadedAssetKeys: [String]?)

Initializes a player item with the specified asset and the asset keys to be automatically loaded.