Instance Method


Removes a specified time range from all tracks of the composition.


func removeTimeRange(_ timeRange: CMTimeRange)



The time range to be removed.


After removing, existing content after the time range will be pulled in.

Removal of a time range does not cause any existing tracks to be removed from the composition, even if removing timeRange results in an empty track. Instead, it removes or truncates track segments that intersect with the time range.

See Also

Managing Time Ranges

func insertEmptyTimeRange(CMTimeRange)

Adds or extends an empty time range within all tracks of the composition.

func insertTimeRange(CMTimeRange, of: AVAsset, at: CMTime)

Inserts all the tracks within a given time range of a specified asset into the receiver.

func scaleTimeRange(CMTimeRange, toDuration: CMTime)

Changes the duration of all tracks in a given time range.