The subscribeForTalkerNotification()
method allows you to receive notification for the talkers in the Room or the participants acting as a source of the noise. You can utilize this method for UI display or for debugging. Note that the list of talkers received could be longer than the Active Talkers list, because Active Talkers list received with onActiveTalkersUpdated
callback is limited to the max_active_talkers
setting of the Room.
Class: EnxRtc
Method: static Future<void> subscribeForTalkerNotification(bool isTalkerNotification)
Parameters:
isTalkerNotification
: Boolean. Set to true to subscribe to Talker Notification and false to unsubscribe.
Callbacks:
onAckSubscribeTalkerNotification
– Acknowledgment to the subscriber when Talker Notification subscribed successfully.onAckUnsubscribeTalkerNotification
– Acknowledgment to the subscriber when Talker Notification unsubscribed successfully.onTalkerNotification
– Notification to the subscriber received with JSON Object carrying the details of users from whom speech or sound is detected.
EnxRtc.subscribeForTalkerNotification(true); // To subscribe EnxRtc.subscribeForTalkerNotification(false); // To unsubscribe EnxRtc.onAckSubscribeTalkerNotification=(Map<dynamic,dynamic> map){ // Acknowledgement on Talker Subscription }; EnxRtc.onAckUnsubscribeTalkerNotification=(Map<dynamic,dynamic> map){ // Acknowledgement on Talker Unsubscription }; EnxRtc.onTalkerNtification=(Map<dynamic,dynamic> map){ // Receive Talker Notification on Subscription };
Error Codes / Exceptions:
Code | Description |
---|---|
5128 | Repeated subscription request call while a previous request is in process. |
5129 | Repeated unsubscription request call while a previous request is in process. |
5130 | Talker Notification already subscribed. |
5131 | Illegible attempt to unsubscribe Talker Notification without subscribing first. |