---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/sandbox/functions/createSandboxMediaReader.md
---

# Function: createSandboxMediaReader()

```ts
function createSandboxMediaReader(
  options: SandboxMediaReaderOptions,
): MediaReader;
```

Defined in: [src/batteries/sandbox/media\_reader.ts:50](https://github.com/NHTIO/ADK/blob/v1.20260824.1/src/src/batteries/sandbox/media_reader.ts#L50)

Create a non-describable, replayable reader over a sandbox file.

## Parameters

| Parameter | Type                                                                      | Description                                                             |
| --------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `options` | [`SandboxMediaReaderOptions`](../interfaces/SandboxMediaReaderOptions.md) | The sandbox filesystem, translated path, epoch, and liveness predicate. |

## Returns

[`MediaReader`](../../../common/interfaces/MediaReader.md)

A file-backed [MediaReader](../../../common/interfaces/MediaReader.md).

## Remarks

Every operation checks the owning epoch, stats the path, and refuses anything whose filesystem
kind is not `file` before opening it. Every stream call then asks the injected filesystem for a
fresh stream; this reader deliberately has no byte cap and does not import a host filesystem.
The reader omits `describe()` because approval-bound sandbox capabilities must not cross a
serialisation boundary.
