Initializer

init(player:)

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

Declaration

init(player: AVPlayer?)

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software