Instance Method


Associates the track corresponding to the specified input with the track corresponding with the receiver.


func addTrackAssociation(withTrackOf input: AVAssetWriterInput, type trackAssociationType: String)



The instance of AVAssetWriterInput with a corresponding track to associate with track corresponding with the receiver.


The type of track association to add. Common track association types, such as timecode are defined in Track Association Types.


If the type of association requires tracks of specific media types that don't match the media types of the inputs, or if the output file type does not support track associations, an invalidArgumentException is raised.

See Also

Managing Track Associations

func canAddTrackAssociation(withTrackOf: AVAssetWriterInput, type: String) -> Bool

Validates the association between the tracks and their corresponding pair of inputs.