# MoqTrackSource

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

Defined in: relay-sdks/ts/packages/moq-core/dist/track-source.d.ts:6

Borrowed access to tracks on a session. Consumers own their requests; only the
connection owner can close the underlying transport. No media format is implied.

## Extends

- `Pick`\<[`MoqtSession`](https://www.caprid.com/docs/reference/typescript/caprid/moq-core/index/interfaces/moqtsession/), `"subscribe"` \| `"fetch"` \| `"trackStatus"`\>

## Properties

### closed

```ts
readonly closed: Promise<{
  error?: unknown;
}>;
```

Defined in: relay-sdks/ts/packages/moq-core/dist/track-source.d.ts:8

Resolves when the owning connection ends; an error denotes failure.

## Methods

### fetch()

```ts
fetch(options, handlers?): FetchHandle;
```

Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:307

Send FETCH (§9.11) on a new request stream. Results arrive through `handlers`.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | [`MoqtSubscribeOptions`](https://www.caprid.com/docs/reference/typescript/caprid/moq-core/index/interfaces/moqtsubscribeoptions/) |
| `handlers?` | [`FetchHandlers`](https://www.caprid.com/docs/reference/typescript/caprid/moq-core/index/interfaces/fetchhandlers/) |

#### Returns

[`FetchHandle`](https://www.caprid.com/docs/reference/typescript/caprid/moq-core/index/interfaces/fetchhandle/)

#### Inherited from

`Pick.fetch`

***

### subscribe()

```ts
subscribe(options, handlers?): Subscription;
```

Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:305

Send SUBSCRIBE (§9.6) on a new request stream. Results arrive through `handlers`.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | [`MoqtSubscribeOptions`](https://www.caprid.com/docs/reference/typescript/caprid/moq-core/index/interfaces/moqtsubscribeoptions/) |
| `handlers?` | [`SubscriptionHandlers`](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/subscriptionhandlers/) |

#### Returns

[`Subscription`](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/subscription/)

#### Inherited from

`Pick.subscribe`

***

### trackStatus()

```ts
trackStatus(options, handlers?): void;
```

Defined in: relay-sdks/ts/packages/moq-core/dist/protocol/session.d.ts:309

Send TRACK_STATUS (§9.13) on a new request stream and report its one response through `handlers`.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | [`MoqtSubscribeOptions`](https://www.caprid.com/docs/reference/typescript/caprid/moq-core/index/interfaces/moqtsubscribeoptions/) |
| `handlers?` | [`TrackStatusHandlers`](https://www.caprid.com/docs/reference/typescript/caprid/moq-core/index/interfaces/trackstatushandlers/) |

#### Returns

`void`

#### Inherited from

`Pick.trackStatus`
