---
title: "replaceCurrentItem(with:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avplayer/replacecurrentitem(with:)"
---

# replaceCurrentItem(with:)

Replaces the current item with a new item.

## Declaration

```swift
nonisolated func replaceCurrentItem(with item: AVPlayerItem?)
```

## Parameters

- `item`: The new item for the player object to play.

## Mentioned in

Controlling the transport behavior of a player

## Discussion

Discussion The player item replacement occurs immediately and the item becomes the player’s currentItem. Calling this method with the player’s current player item has no effect.

## See Also

### Managing the player item

- [currentItem](avfoundation/avplayer/currentitem.md)
