track(withTrackID:)
Returns a track that contains the specified identifier.
Declaration
func track(withTrackID trackID: CMPersistentTrackID) -> AVFragmentedAssetTrack?Parameters
- trackID:
The identifier of the track to return.
Return Value
A fragmented asset track, or nil if no track with the specified identifier is available.
Discussion
Apple discourages the use of this method in iOS 15, tvOS 15, and macOS 12 or later. Load a track asynchronously using loadTrack(withTrackID:completionHandler:) instead.
You may call this method without blocking the current thread after you’ve asynchronously loaded the tracks property.