useActiveSpeakerId for the current speaker, and useAudioLevelObserver for continuous volume.
Highlight the active speaker
useActiveSpeakerId returns the session ID of the participant Daily considers the active speaker, or null when nobody has spoken:
Spotlight layouts
For a spotlight that follows the speaker, render the active speaker’s video directly. PassignoreLocal so your own voice does not steal the spotlight:
filter callback to restrict which participants can become the active speaker, for example to spotlight only presenters:
Build a volume meter
The active speaker is a coarse, on/off signal. For a continuous volume meter,useAudioLevelObserver calls you back with a number between 0 and 1 as a participant’s volume changes:
interval (minimum 100ms) to control how often the callback fires, and onError to handle browsers where the observer is unavailable.
The older
useAudioLevel hook (which took a raw MediaStreamTrack) is deprecated as of 0.20.0. Use useAudioLevelObserver with a sessionId instead.Speaking indicator, complete
A muted-aware speaking dot for a tile:Next steps
Rendering media
The video and audio components.
Working with participants
Read more participant state.