Highlight active speaker while talking
Hi, I would like to highlight an active speaker only, when he is actually speaking (volume threshold reached).
I found several hooks to get the last active speaker, but they only indicate the change in the active speakers, not actively speaking (useActiveParticipant, useActiveSpeakerId, active-speaker-change
event). I want to remove the highlight of the actively speaking user(s) the moment he/they stops talking, not when he mutes his mic. The highlight could also happen for 5 users simultaneously..
Best Answer
-
Hey @Daniel808,
I think for this the audio level observer API is the best suitable:
For the local participant there's also a local audio level observer:
There's also a React hook
, but that one runs an audio AnalyzerNode in the audio context, which adds to the CPU quite signifcantly.It will eventually be replaced or migrated by a hook that incorporates the audio level observers, but it's currently not high on the priority list.
Hope this guides you into the right direction!
Best
Christian
1
Answers
-
Thank you for the fast response and pointing me in the audio level observer API direction :)
1