Instance Method

removeTimeRange(_:)

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

Declaration

func removeTimeRange(_ timeRange: CMTimeRange)

Parameters

timeRange

The time range to be removed.

Discussion

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.