Skip to main content
stopCustomTrack(trackName) Prebuilt Custom Stops the specified custom track. To confirm the track has stopped, listen for participant-updated or track-stopped and check that the track key is no longer present in the local participant’s tracks property.

Parameters

trackName
string
required
The name of the custom track to stop. This is the value returned by startCustomTrack() when the track was started.

Return value

Returns a Promise<string> that resolves to the name of the stopped track.

Example

const trackName = await call.startCustomTrack({ track: myTrack });

// Later, stop it
await call.stopCustomTrack(trackName);

See also