# RegisterTrackOptions

URL: https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/registertrackoptions/

Defined in: [relay-sdks/ts/src/publish.ts:66](https://github.com/caprids/relay-sdks/blob/main/ts/src/publish.ts#L66)

What [RelayPublisher.registerTrack](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/relaypublisher/#registertrack) needs. The namespace is the publisher connection's;
the generic core's type of the same name spells it out as a field one level down.

## Properties

### track

```ts
track: string;
```

Defined in: [relay-sdks/ts/src/publish.ts:68](https://github.com/caprids/relay-sdks/blob/main/ts/src/publish.ts#L68)

Track name, unique within this publisher connection, including after its writer closes.

***

### trackProperties?

```ts
trackProperties?: readonly PublishProperty[];
```

Defined in: [relay-sdks/ts/src/publish.ts:86](https://github.com/caprids/relay-sdks/blob/main/ts/src/publish.ts#L86)

Track metadata sent to the relay. The SDK adds no default timescale; the relay may
add, drop, or rewrite properties before delivery to subscribers. With moq-relay 0.17.0 every
SUBSCRIBE_OK carries the relay's track properties, not these, and a Timescale (`0x08`) here is
what keeps supplied object Timestamps unchanged. See "Relay property handling" in
spec/behavior.md. The list rides in every SUBSCRIBE_OK (and TRACK_STATUS_OK), so it must encode to at most 65525
bytes, hold at most 64 pairs (the relay's limit) and keep `0x0E` at most 255 and `0x22` at 1
or 2 (draft-22); otherwise the relay would refuse every subscriber, so `registerTrack` throws a
RangeError instead.

An OBJECT_DELIVERY_TIMEOUT (`0x02`) or SUBGROUP_DELIVERY_TIMEOUT (`0x06`) here, in milliseconds,
is the publisher's delivery timeout (draft-22 §5.2), which the first object of a group can
override for that group. An object still short of the transport when the object timeout
expires fails its write with `DELIVERY_TIMEOUT`; a completed group the relay has not
acknowledged when the subgroup timeout expires is reset, and nothing is reported. 0 means no
timeout.

***

### writeTimeoutMs?

```ts
writeTimeoutMs?: number;
```

Defined in: [relay-sdks/ts/src/publish.ts:88](https://github.com/caprids/relay-sdks/blob/main/ts/src/publish.ts#L88)

Deadline for relay demand and stream writes. Default 10 seconds, maximum 2147483647.
