Type Method

playerLayerWithPlayer:

Creates a player layer to display the visual output of a specified player.

Declaration

+ (AVPlayerLayer *)playerLayerWithPlayer:(AVPlayer *)player;

Parameters

player

The player for which the player layer displays visual output.

Return Value

An AVPlayerLayer object configured to display the visual output of player.

Discussion

You can create arbitrary numbers of player layers with the same AVPlayer object, but you should limit the number of layers you create to avoid impacting playback performance.

See Also