A group of tracks in a mutually exclusive relationship.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
Use this class to associate tracks corresponding to multiple
AVAsset instances as mutually exclusive to each other for playback or other processing.
For example, if you are creating an asset with multiple audio tracks using different spoken languages—and only one track should be played at a time—group the inputs corresponding to those tracks into a single instance of
AVAsset and add the group to the
AVAsset instance using the
add(_:). If the output format supports mutually exclusive relationships among tracks, the
AVAsset marks the tracks as mutually exclusive to each other.
AVAsset is a subclass of
AVMedia, clients can examine the media selection options that are available on the output asset before writing the asset. Obtain the best results by examining the options of the
AVAsset after associating the
AVAsset instances of the
AVAsset objects as appropriate using the
add and by initializing each
AVAsset with a source format hint, where appropriate.