> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# startCustomTrack()

> Sends a custom MediaStreamTrack to all other participants in the call.

`startCustomTrack(options)`

<Badge color="red">{"✗"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

Starts sharing a custom [`MediaStreamTrack`](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack) with all other participants. Custom tracks are sent in addition to the standard `audio`, `video`, `screenAudio`, and `screenVideo` tracks — they do not replace them. Calling this with the same `trackName` replaces the existing custom track of that name.

Must be called after `join()`. To stop sharing the track, use [`stopCustomTrack()`](/reference/daily-js/instance-methods/stop-custom-track).

<Note>
  Custom tracks are not the right tool for screen sharing. For screen content, use [`startScreenShare()`](/reference/daily-js/instance-methods/start-screen-share) instead. See [Screenshare streams vs. custom tracks](/docs/daily-js/features/screen-sharing#screenshare-streams-vs-custom-tracks) for guidance on when to use each.
</Note>

## Parameters

<ParamField body="track" type="MediaStreamTrack" required>
  The raw `MediaStreamTrack` to send.
</ParamField>

<ParamField body="trackName" type="string">
  An identifier for the custom track (max 50 characters). Must not conflict with reserved names: `"audio"`, `"video"`, `"cam-audio"`, `"cam-video"`, `"screenVideo"`, `"screenAudio"`, `"screen-video"`, `"screen-audio"`, `"rmpAudio"`, `"rmpVideo"`, `"customVideoDefaults"`.

  If omitted, Daily generates a name in the format `custom$TRACK_KIND$COUNT` (e.g. `"customAudio0"`, `"customVideo1"`). The resolved name is returned by the Promise.
</ParamField>

<ParamField body="mode" type="'music' | 'speech' | DailyMicAudioModeSettings">
  Audio processing mode for the track. Accepts the same values as [`micAudioMode`](/reference/daily-js/types/daily-call-options#param-mic-audio-mode).
</ParamField>

<ParamField body="ignoreAudioLevel" type="boolean" default="false">
  When `true`, this track is not factored into active speaker events.
</ParamField>

## Return value

Returns a `Promise<string>` that resolves to the track's identifier — either the `trackName` you provided or the auto-generated one.

## Errors

Throws in the following cases:

* Not currently in a call.
* `trackName` matches a reserved name.
* `trackName` exceeds 50 characters.
* `track` is not a `MediaStreamTrack` instance.

## Examples

```javascript theme={null}
// Start a custom track, let Daily generate the name
const trackName = await call.startCustomTrack({ track: customTrack });
console.log('Track started as:', trackName); // e.g. "customVideo0"

// Start with an explicit name
const trackName = await call.startCustomTrack({
  track: customTrack,
  trackName: 'cameraFeed2',
});
```

## Subscribing to custom tracks

To receive a remote participant's custom tracks, subscribe to them via [`updateParticipant()`](/reference/daily-js/instance-methods/update-participant):

```javascript theme={null}
// Subscribe to all custom tracks from a participant
call.updateParticipant(sessionId, {
  setSubscribedTracks: { custom: true },
});

// Subscribe to a specific custom track
call.updateParticipant(sessionId, {
  setSubscribedTracks: { custom: { customVideo0: true } },
});
```

## See also

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [stopCustomTrack()](/reference/daily-js/instance-methods/stop-custom-track)
    * [updateParticipant()](/reference/daily-js/instance-methods/update-participant)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [participant-updated](/reference/daily-js/events/participant-events#participant-updated)
    * [track-started](/reference/daily-js/events/media-events#track-started)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Custom tracks](/docs/daily-js/features/custom-tracks)
  </Card>
</CardGroup>
