---
title: completionHandler
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/audioplaybackcontroller/completionhandler
---

# completionHandler

A closure that the playback controller executes when it reaches the end of the audio stream.

## Declaration

```swift
@MainActor @preconcurrency var completionHandler: (() -> Void)? { get set }
```

## Discussion

Discussion The controller doesn’t call the closure if you manually stop the audio by calling the stop() or the pause() method. note: You can only register one handler at a time. If you set a new handler, the controller discards the old one.
