# FrameReaderOptions

URL: https://www.caprid.com/docs/reference/typescript/caprid/relay/media/interfaces/framereaderoptions/

Defined in: [relay-sdks/ts/src/frame-reader.ts:31](https://github.com/caprids/relay-sdks/blob/main/ts/src/frame-reader.ts#L31)

Options for [createFrameReader](https://www.caprid.com/docs/reference/typescript/caprid/relay/media/functions/createframereader/).

## Type Parameters

| Type Parameter |
| ------ |
| <a id="type-parameter-f"></a> `F` |

## Methods

### onCatchUp()?

```ts
onCatchUp?(): void;
```

Defined in: [relay-sdks/ts/src/frame-reader.ts:43](https://github.com/caprids/relay-sdks/blob/main/ts/src/frame-reader.ts#L43)

The sequencer signalled a catch-up (`@caprid/moq-media`'s `catchUpAfterUs`): frames keep arriving too late to use.
Replace the subscription at the live edge, which drops what the relay still holds queued for it: a supervised
subscriber's `catchUp(key)` does, and its `onRestarted` restarts this reader. Called synchronously, after the
frames of the same poll; an exception from it goes to `console.error`.

#### Returns

`void`

***

### onFrame()

```ts
onFrame(frame): void;
```

Defined in: [relay-sdks/ts/src/frame-reader.ts:36](https://github.com/caprids/relay-sdks/blob/main/ts/src/frame-reader.ts#L36)

Called synchronously with each frame, in decode order. An exception from it goes to `console.error` and the reader
carries on.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `frame` | `F` |

#### Returns

`void`
