Instance Method


Removes a specified track from the receiver.


func removeTrack(_ track: AVCompositionTrack)



The track to remove.


When it is removed track’s @"composition" key is set to nil. The values of its other keys remain intact, for arbitrary use.

See Also

Managing Tracks

var tracks: [AVMutableCompositionTrack]

An array of mutable composition tracks contained by the composition.

func mutableTrack(compatibleWith: AVAssetTrack) -> AVMutableCompositionTrack?

Returns a track in the receiver into which any time range of a given asset track can be inserted.

func track(withTrackID: CMPersistentTrackID) -> AVMutableCompositionTrack?

Provides a composition track associated with the specified track ID.

func tracks(withMediaCharacteristic: AVMediaCharacteristic) -> [AVMutableCompositionTrack]

Provides the composition tracks of the specified media characteristic associated with an asset.

func tracks(withMediaType: AVMediaType) -> [AVMutableCompositionTrack]

Provides the composition tracks of the specified media type associated with an asset.