<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaExtension",
  "identifier" : "/documentation/MediaExtension/MESampleLocation/init(byteSource:sampleLocation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "MediaExtension"
    ],
    "preciseIdentifier" : "c:objc(cs)MESampleLocation(im)initWithByteSource:sampleLocation:"
  },
  "title" : "init(byteSource:sampleLocation:)"
}
-->

# init(byteSource:sampleLocation:)

Creates a sample location object with the byte source and sample location that you specify.

```
init(byteSource: MEByteSource, sampleLocation: AVSampleCursorStorageRange)
```

## Parameters

`byteSource`

The byte source to use to read the data for the sample.

`sampleLocation`

The starting file offset and size in bytes of the sample.

---

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)