Contents

addTrackAssociation(withTrackOf:type:)

Adds an association between input tracks.

Declaration

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

Parameters

  • input:

    The input that contains the track to associate with this input’s track.

  • trackAssociationType:

    The type of track association to add.

Discussion

The system raises an error if the association type requires tracks of a media type that doesn’t match the input’s type, or if the output file type doesn’t support track associations.

You can’t add track associations after writing starts.

See Also

Configuring track associations