Does activeSpeakerObserver work as expected in current mediasoup?

Hi Team,

Can you please confirm if the activeSpeakerObserver in the current mediasoup version (3.16.0) works as expected?

Here’s how I’m initializing and using it on my side:

this.activeSpeakerObserver = await this.router.createActiveSpeakerObserver();
this.activeSpeakerObserver.on('dominantspeaker', (dominantSpeaker) => {
    log.debug('activeSpeakerObserver "dominantspeaker" event', dominantSpeaker.producer.id);
});

When producing audio, I add the producer’s ID to the observer like this:

this.activeSpeakerObserver.addProducer(producerId);

However, for some reason, the 'dominantspeaker' event is never triggered.

Maybe something missing in this commit.

Has anyone experienced this? Any advice or pointers would be appreciated.

Thanks!

I won’t be able to look at this for some weeks. Assuming you are using OPUS and router.createAudioLevelObserver() does work, could you fill a ticket in GitHub, please?

Yes, I’m using both. The this.router.createAudioLevelObserver() works as expected — the issue I’m facing is specifically with this.router.createActiveSpeakerObserver().

If you agree, I can open an issue on GitHub to investigate further on the mediasoup side or keep this topic here?

Thanks again!

Looks like a bug. Please open a ticket in GitHub to not forget just in case. Thanks.

:backhand_index_pointing_right: Done