> ## 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.

# useActiveParticipant

> Returns an object for the participant id mentioned in the most recent active-speaker-change event.

<Badge color="yellow">Deprecated 0.17.0</Badge>

`useActiveParticipant(params?) : Object | null`

`useActiveParticipant` can also set up an optional callback for the [`active-speaker-change`](/reference/daily-js/events/participant-events#active-speaker-change) event.

## Parameters

<ParamField body="ignoreLocal" type="boolean">
  If `true`, `useActiveParticipant` will not return a participant object when the local participant is the active speaker.
</ParamField>

<ParamField body="onActiveSpeakerChange" type="Function">
  Event callback for the [`active-speaker-change`](/reference/daily-js/events/participant-events#active-speaker-change) event listener.
</ParamField>

## Return value

Returns `DailyParticipant | null`. Contains detailed information about the participant, see [participant properties](/reference/daily-js/types/daily-participant). If no participant has unmuted, `useActiveParticipant` returns `null`.

## Example

```jsx theme={null}
import { useActiveParticipant } from '@daily-co/daily-react';

export const CurrentSpeaker = () => {
  const activeSpeaker = useActiveParticipant();
  return (
    <div>{activeSpeaker?.user_name ?? 'Nobody'} is currently speaking.</div>
  );
};
```

## See also

<CardGroup>
  <Card title="Hooks" icon="code" iconType="solid">
    * [useActiveSpeakerId()](/reference/daily-react/use-active-speaker-id)
    * [useParticipantProperty()](/reference/daily-react/use-participant-property)
    * [useParticipant()](/reference/daily-react/use-participant)
    * [useLocalParticipant()](/reference/daily-react/use-local-participant)
    * [useLocalSessionId()](/reference/daily-react/use-local-session-id)
    * [useParticipantCounts()](/reference/daily-react/use-participant-counts)
    * [useParticipantIds()](/reference/daily-react/use-participant-ids)
    * [useWaitingParticipants()](/reference/daily-react/use-waiting-participants)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [active-speaker-change](/reference/daily-js/events/participant-events#active-speaker-change)
  </Card>
</CardGroup>
