How to track who is currently talking.
Closed this issue · 3 comments
In the joinRoom method, there is a Publishers object in which there is a "talking" parameter, but it does not display the state of the talking participant?
How to track who is currently talking?
you need to explicitly enable this behaviour by setting
audiolevel_event = true|false (whether to emit event to other users or not, default=false)
audio_active_packets = 100 (number of packets with audio level, default=100, 2 seconds)
audio_level_average = 25 (average value of audio level, 127=muted, 0='too loud', default=25)
in janus.plugins.videoroom.jcfg file
please make sure to go through documentation of janus before opening issue here or alternatively ask in discussions/gitter community, closing now!
Hello,
I'm sure I have configured room as you suggested.
I added some code into event class and edited janus_video_room_plugin.dart like this.
} else if (typedEvent.event.plugindata?.data['videoroom'] == 'talking' || typedEvent.event.plugindata?.data['videoroom'] == 'stopped-talking') {
typedEvent.event.plugindata?.data = VideoRoomAudioLevelEvent.fromJson(typedEvent.event.plugindata?.data);
_typedMessagesSink?.add(typedEvent);
However it does not seem to work. Appreciate if you give suggestions.
Thanks.
According to documentation isTalking boolean in participants was deprecated, regarding your code it seems you have used it from audiobridge src code its not gonna work until you know what event values janus is sending out for videoroom corresponding to talking event
I would suggest you to use enabled property of each mediatrack object inorder to know whether track is actively flowing or not on sender's side you can stop and resume it. For more reference you should check out how transreciever work