<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaExtension",
  "identifier" : "/documentation/MediaExtension/METrackReader",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "MediaExtension"
    ],
    "preciseIdentifier" : "c:objc(pl)METrackReader"
  },
  "title" : "METrackReader"
}
-->

# METrackReader

A protocol that defines the information to provide about a track within a media asset.

```
protocol METrackReader : NSObjectProtocol
```

## Overview

Return default values for methods that don’t apply to a track type.

## Topics

### Getting track information

[`-  loadTrackInfoWithCompletionHandler:`](/documentation/MediaExtension/METrackReader/loadTrackInfo(completionHandler:))

Loads the track info object with the properties of the media asset track.

[`-  generateSampleCursorAtPresentationTimeStamp:completionHandler:`](/documentation/MediaExtension/METrackReader/generateSampleCursor(atPresentationTimeStamp:completionHandler:))

Provides a new sample cursor that points to the sample at or near the specified presentation timestamp.

[`-  generateSampleCursorAtFirstSampleInDecodeOrderWithCompletionHandler:`](/documentation/MediaExtension/METrackReader/generateSampleCursorAtFirstSampleInDecodeOrder(completionHandler:))

Provides a new sample cursor that points to the first sample in decode order.

[`-  generateSampleCursorAtLastSampleInDecodeOrderWithCompletionHandler:`](/documentation/MediaExtension/METrackReader/generateSampleCursorAtLastSampleInDecodeOrder(completionHandler:))

Provides a new sample cursor that points to the last sample in decode order.

[`-  loadUneditedDurationWithCompletionHandler:`](/documentation/MediaExtension/METrackReader/loadUneditedDuration(completionHandler:))

Returns the duration of the track, disregarding edits.

[`-  loadTotalSampleDataLengthWithCompletionHandler:`](/documentation/MediaExtension/METrackReader/loadTotalSampleDataLength(completionHandler:))

Loads the total size in bytes of all the samples in the track.

[`-  loadEstimatedDataRateWithCompletionHandler:`](/documentation/MediaExtension/METrackReader/loadEstimatedDataRate(completionHandler:))

Loads the approximate data rate of the track in bytes per second.

[`-  loadMetadataWithCompletionHandler:`](/documentation/MediaExtension/METrackReader/loadMetadata(completionHandler:))

Loads the array of metadata items from the media asset track.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)