Contents

scaleTimeRange(_:toDuration:)

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

Declaration

func scaleTimeRange(_ timeRange: CMTimeRange, toDuration duration: CMTime)

Parameters

  • timeRange:

    The time range of the composition to scale.

  • duration:

    The new time range duration.

Discussion

A composition presents each track segment affected by the scaling operation at a rate equal to source.duration / target.duration of its resulting time mapping.

See Also

Managing time ranges