Valora
API Reference@valora-ai/reactindexFunctions

useTrackByName

function useTrackByName(name, participant?): VoiceTrackReferencePlaceholder;

Defined in: packages/react/src/hooks/track/useTrackByName.ts:25

This function useTrackByName allows you to access a track by referencing its track name. Inside the function, it ensures that the a valid participant reference is available by checking for both a passed participant argument and,

Parameters

ParameterType
namestring
participant?unknown

Returns

VoiceTrackReferencePlaceholder

Example

const trackRef = useTrackByName("tts", participant);
return <ParticipantTile trackRef={trackRef} />;

On this page

Valora is local-first

No API key, no server — everything in this doc runs on-device.

Star on GitHub