Skip to content
1 min read · 115 words

Function: createSandboxMediaReader() ​

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

Defined in: src/batteries/sandbox/media_reader.ts:50

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

Parameters ​

ParameterTypeDescription
optionsSandboxMediaReaderOptionsThe sandbox filesystem, translated path, epoch, and liveness predicate.

Returns ​

MediaReader

A file-backed MediaReader.

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.