---
title: "CMTimeRangeGetIntersection(_:otherRange:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmtimerangegetintersection(_:otherrange:)"
---

# CMTimeRangeGetIntersection(_:otherRange:)

Returns a new time range with the time elements that are common between the input.

## Declaration

```swift
func CMTimeRangeGetIntersection(_ range: CMTimeRange, otherRange: CMTimeRange) -> CMTimeRange
```

## Parameters

- `range`: The first time range to intersect.
- `otherRange`: The second time range to intersect.

## Return Value

Return Value A time range that represents the largest intersection of the input.

## See Also

### Inspecting Time Ranges

- [CMTIMERANGE_IS_EMPTY(_:)](coremedia/cmtimerange_is_empty(_:).md)
- [CMTIMERANGE_IS_INDEFINITE(_:)](coremedia/cmtimerange_is_indefinite(_:).md)
- [CMTIMERANGE_IS_INVALID(_:)](coremedia/cmtimerange_is_invalid(_:).md)
- [CMTIMERANGE_IS_VALID(_:)](coremedia/cmtimerange_is_valid(_:).md)
- [CMTimeRangeGetEnd(_:)](coremedia/cmtimerangegetend(_:).md)
- [CMTimeRangeGetUnion(_:otherRange:)](coremedia/cmtimerangegetunion(_:otherrange:).md)
