---
title: avPlayer
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/videomaterial/avplayer
---

# avPlayer

The material’s video playback controller.

## Declaration

```swift
@MainActor @preconcurrency var avPlayer: AVPlayer? { get set }
```

## Discussion

Discussion Use this property to control animation playback for a video texture. This property allows you to play or pause the movie, seek to (in other words, skip to) a specific part of the movie, or to change the movie’s playback rate. The following code demonstrates pausing the texture’s video and restarting it from the beginning of the movie file: myMaterial.avPlayer.pause() myMaterial.avPlayer.seek(to: .zero) myMaterial.avPlayer.play()

## See Also

### Controlling playback

- [controller](realitykit/videomaterial/controller.md)
