Contents

beginTrimming(completionHandler:)

Presents the system trimming interface controls inside the player view.

Declaration

func beginTrimming(completionHandler handler: ((Bool) -> Void)? = nil)
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

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