Instance Method

initWithAsset:

Initializes a new player item for a given asset.

Declaration

- (instancetype)initWithAsset:(AVAsset *)asset;

Parameters

asset

The AVAsset to be played.

Return Value

A new player item, initialized to play asset.

See Also

Creating a Player Item

- initWithURL:

Initializes a player item with a given URL.

+ playerItemWithURL:

Returns a new player item, prepared to use a given URL.

+ playerItemWithAsset:

Returns a new player item for a given asset.

- initWithAsset:automaticallyLoadedAssetKeys:

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

+ playerItemWithAsset:automaticallyLoadedAssetKeys:

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