---
title: "CMTimeRangeContainsTimeRange(_:otherRange:)"
framework: Core Media
role: symbol
role_heading: Function
platforms: [iOS 4.0+, iPadOS 4.0+, Mac Catalyst 13.1+, macOS 10.7+, tvOS 9.0+, visionOS 1.0+, watchOS 6.0+]
path: "coremedia/cmtimerangecontainstimerange(_:otherrange:)"
---

# CMTimeRangeContainsTimeRange(_:otherRange:)

Returns a Boolean value that indicates whether a time range contains another time range.

## Declaration

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

## Parameters

- `range`: The first time range to compare.
- `otherRange`: The second time range to test for inclusion.

## Return Value

Return Value true if range1 contains range2; otherwise, false.

## See Also

### Comparing Time Ranges

- [CMTimeRangeEqual(_:_:)](coremedia/cmtimerangeequal(_:_:).md)
- [CMTimeRangeContainsTime(_:time:)](coremedia/cmtimerangecontainstime(_:time:).md)
