Instance Method

addMutableTracksCopyingSettings(from:options:)

Adds one or more empty tracks to the target movie and copies the track settings from the source tracks.

Declaration

func addMutableTracksCopyingSettings(from existingTracks: [AVAssetTrack], options: [String : Any]? = nil) -> [AVMutableMovieTrack]

Parameters

existingTracks

An array of asset tracks to be added.

options

A dictionary that contains key for specifying the movie object initialization. Currently, no keys are defined.

Return Value

An array of AVMutableMovieTrack objects. The index of a track in this array is the same as the index of its source track in the existingTracks array.

Discussion

Properties involving pairs of tracks,such as track references, are copied from the source tracks to the target tracks.

See Also

Modifying Tracks

func removeTrack(AVMovieTrack)

Removes the specified track from the target movie.

var tracks: [AVMutableMovieTrack]

An array of tracks in a mutable movie.

func track(withTrackID: CMPersistentTrackID) -> AVMutableMovieTrack?

A mutable movie track representing the track with the specified track identifier.

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

An array of mutable movie tracks that match the specified media characteristic.

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

An array of mutable movie tracks that match the specified media type.

func mutableTrack(compatibleWith: AVAssetTrack) -> AVMutableMovieTrack?

Provides a reference to a track from a mutable movie into which any time range can be inserted.