---
title: "beginTrimming(completionHandler:)"
framework: avkit
role: symbol
role_heading: Instance Method
path: "avkit/avplayerviewcontroller/begintrimming(completionhandler:)"
---

# beginTrimming(completionHandler:)

Presents the system trimming interface controls inside the player view.

## Declaration

```swift
func beginTrimming(completionHandler handler: ((Bool) -> Void)? = nil)
```

```swift
func beginTrimming() async -> Bool
```

## Parameters

- `handler`: A completion handler that the system calls with a Boolean value that indicates whether the user completed the trim operation, or if they canceled it.

## Mentioned in

Trimming and exporting media in visionOS

## Discussion

Discussion After trimming is complete, you can access the trimmed range by querying the forwardPlaybackEndTime and reversePlaybackEndTime properties on the AVPlayerItem. For more information on supporting trimming in your app, see Trimming and exporting media in visionOS.

## See Also

### Presenting the visionOS trimming UI

- [canBeginTrimming](avkit/avplayerviewcontroller/canbegintrimming.md)
