Live Statistics
The Flutter SDK provides the following methods:
- enableStats(): to get live statistics of each stream
- subscribeForTalkerNotification(): to receive notifications for the talkers in the Room
Live Media Statistics
The EnxRtc.enableStats()
method allows you to receive statistics for all the streams received in a room. The statistics help you analyze the streaming quality of all the streams by providing information about the streams, such as:
-
For Local Streams:
- Transmission bandwidth
- Video resolution
-
For Subscribed Streams:
- Receiving bandwidth
- Video resolution
- Available bandwidth for a remote user
- Packet loss
Class: EnxRtc
Method: static Future<void> enableStats (bool enableStats)
Parameter: enableStats
: Set to true to enable statistics display.
Set to false
to disable statistics.
Event Listeners:
Event Listener | Description |
---|---|
onAcknowledgeStats | Acknowledgment to the user when stream stats are enabled or disabled. |
onReceivedStats | Notification to the user when all streams stats are received. |
Sample Code
EnxRtc.enableStats(true); // Enable StatsEnxRtc.onAcknowledgeStats = (Map<dynamic,dynamic> map) {};EnxRtc. onReceivedStats = (Map<dynamic,dynamic> map) {};
Talker And Noise Notification
The subscribeForTalkerNotification()
method allows you to receive notifications for the talkers in the room or the participants acting as a noise source. 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 the 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)
Parameter: isTalkerNotification
: A true value means to subscribe to Talker Notification.
A false value means to unsubscribe.
Event Listeners:
Event Listener | Description |
---|---|
onAckSubscribeTalkerNotification | Acknowledgment to the subscriber when the talker notification subscribed successfully. |
onAckUnsubscribeTalkerNotification | Acknowledgment to the subscriber when the talker notification unsubscribed successfully. |
onTalkerNotification | * speech : It contains users, an array of client information who are talking with their clientId and speechType (intensity) as low, media high* noise : an array of clientIds producing noise. |
Sample Code
EnxRtc.subscribeForTalkerNotification(true); // To subscribeEnxRtc.subscribeForTalkerNotification(false); // To unsubscribeEnxRtc.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 and Exceptions
Code | Description |
---|---|
5128 | Repeated subscription request is called while a previous request is in process. |
5129 | Repeated unsubscription request is called while a previous request is in process. |
5130 | Talker notification is already subscribed. |
5131 | Illegible attempt to unsubscribe talker notification without subscribing first. |