<!--
{
  "availability" : [
    "iOS: 4.0.0 - 16.0.0",
    "iPadOS: 4.0.0 - 16.0.0",
    "macCatalyst: 13.1.0 - 16.0.0",
    "macOS: 10.7.0 - 13.0.0",
    "tvOS: 9.0.0 - 16.0.0",
    "watchOS: 1.0.0 - 9.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAsset/tracks(withMediaCharacteristic:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAsset(im)tracksWithMediaCharacteristic:"
  },
  "title" : "tracks(withMediaCharacteristic:)"
}
-->

# tracks(withMediaCharacteristic:)

Returns an array of asset tracks matching the specified media characteristic.

```
func tracks(withMediaCharacteristic mediaCharacteristic: AVMediaCharacteristic) -> [AVAssetTrack]
```

## Parameters

`mediaCharacteristic`

The media characteristic of the tracks to return.

## Return Value

An array of tracks, which is empty if there are no tracks with the media characteristic.

## Discussion

Apple discourages using this method in iOS 15, tvOS 15, macOS 12, and watchOS 8 or later. Load tracks asynchronously using [`loadTracks(withMediaCharacteristic:completionHandler:)`](/documentation/AVFoundation/AVAsset/loadTracks(withMediaCharacteristic:completionHandler:)) instead.

You can call this method without blocking the current thread when the data in the [`tracks`](/documentation/AVFoundation/AVAsset/tracks) property is already loaded.

---

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)