findCompatibleTrack(for:completionHandler:)
Loads an asset track from which you can insert any time range into the composition track.
Declaration
func findCompatibleTrack(for compositionTrack: AVCompositionTrack, completionHandler: @escaping @Sendable (AVAssetTrack?, (any Error)?) -> Void)func findCompatibleTrack(for compositionTrack: AVCompositionTrack) async throws -> AVAssetTrack?Parameters
- compositionTrack:
A composition track to request an asset track for.
- completionHandler:
A callback the system invokes after it finishes the request. The system calls the completion handler with the following arguments:
- track
The compatible asset track, or
nilif there isn’t one or an error occurs.- error
An error object if the request fails; otherwise,
nil.
Discussion
This method is the logical complement of mutableTrack(compatibleWith:).