Type Method

playerWithURL:

Returns a new player to play a single audiovisual resource referenced by a given URL.

Declaration

+ (instancetype)playerWithURL:(NSURL *)URL;

Parameters

URL

A URL that identifies an audiovisual resource.

Return Value

A new player initialized to play the audiovisual resource specified by URL.

Discussion

This method implicitly creates an AVPlayerItem object. You can get the player item using currentItem.

See Also

Creating a Player

- initWithURL:

Creates a new player to play a single audiovisual resource referenced by a given URL.

- initWithPlayerItem:

Creates a new player to play the specified player item.

+ playerWithPlayerItem:

Returns a new player initialized to play the specified player item.