isValid(for:assetDuration:timeRange:validationDelegate:)
Indicates whether the time ranges of the composition’s instructions conform to validation requirements.
Declaration
func isValid(for tracks: [AVAssetTrack], assetDuration duration: CMTime, timeRange: CMTimeRange, validationDelegate: (any AVVideoCompositionValidationHandling)?) -> BoolParameters
- tracks:
Pass a reference to an asset’s tracks if you wish to validate the track IDs of the layer instructions against the asset’s tracks. Pass
nilto skip that validation. This method throws an exception if the tracks aren’t all from the same asset. - duration:
Pass the asset duration to validate the time ranges of the instructions. Pass Invalid to skip that validation.
- timeRange:
The composition only validates those instructions with time ranges that overlap with the specified time range. To validate all instructions that the composition may use for playback or other processing, regardless of time range, pass
CMTimeRange(start: .zero, end: .positiveInfinity). - validationDelegate:
A delegate that handles validation requests. May be
nil.