iOS Developer Library

Developer

AV Foundation Framework Reference AVCompositionTrack Class Reference

Options
Deployment Target:

On This Page
Language:

AVCompositionTrack

An AVCompositionTrack object provides the low-level representation of tracks a track in an AVComposition object, comprising a media type, a track identifier, and an array of AVCompositionTrackSegment objects, each comprising a URL, and track identifier, and a time mapping.

The timeMapping.target.start of the first track segment in a composition track is kCMTimeZero, and the timeMapping.target.start of each subsequent track segment equals CMTimeRangeGetEnd(<#previousTrackSegment#>.timeMapping.target).

The AVFoundation framework also provides a mutable subclass, AVMutableCompositionTrack.

  • The composition track’s track segments. (read-only)

    Declaration

    Swift

    var segments: [AVCompositionTrackSegment] { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSArray <AVCompositionTrackSegment *> *segments

    Availability

    Available in iOS 4.0 and later.