# composeMoqSource

URL: https://www.caprid.com/docs/reference/typescript/caprid/moq-media/functions/composemoqsource/

```ts
function composeMoqSource(
   origin, 
   namespace, 
   options?
): string;
```

Defined in: [source.ts:39](https://github.com/caprids/relay-sdks/blob/main/ts/packages/moq-media/src/source.ts#L39)

Compose the `moqt://` source URL a MoQ player takes: the relay URL with its scheme switched to `moqt:` (authority,
path and query kept), and a `#msf:` fragment naming the namespace and track. The relay URL must be an absolute
`https://` or `moqt://` URL with no credentials or fragment; namespace fields must be non-empty.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `origin` | `string` |
| `namespace` | readonly `string`[] |
| `options?` | [`ComposeMoqSourceOptions`](https://www.caprid.com/docs/reference/typescript/caprid/moq-media/interfaces/composemoqsourceoptions/) |

## Returns

`string`
