---
title: "init(player:)"
framework: avfoundation
role: symbol
role_heading: Initializer
path: "avfoundation/avplayerlayer/init(player:)"
---

# init(player:)

Creates a layer object to present the visual contents of a player’s current item.

## Declaration

```swift
init(player: AVPlayer?)
```

## Parameters

- `player`: The player whose visual contents the layer presents.

## Return Value

Return Value A layer that displays the visual output of the associated player.

## Discussion

Discussion You may create an arbitrary number of layers for the same player object.
