<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMTimeRangeGetUnion(_:otherRange:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMTimeRangeGetUnion"
  },
  "title" : "CMTimeRangeGetUnion(_:otherRange:)"
}
-->

# CMTimeRangeGetUnion(_:otherRange:)

Returns a new time range with the time elements of the input.

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

## Parameters

`range`

The first time range.

`otherRange`

The second time range.

## Return Value

A time range with the unique time elements of the input.

## Discussion

The return value contains the smallest range that includes all times that are in either range.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)