Live Statistics

The Flutter SDK provides the following methods:

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 ListenerDescription
onAcknowledgeStatsAcknowledgment to the user when stream stats are enabled or disabled.
onReceivedStatsNotification to the user when all streams stats are received.

Sample Code

EnxRtc.enableStats(true); // Enable Stats
EnxRtc.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 ListenerDescription
onAckSubscribeTalkerNotificationAcknowledgment to the subscriber when the talker notification subscribed successfully.
onAckUnsubscribeTalkerNotificationAcknowledgment 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 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 and Exceptions

CodeDescription
5128Repeated subscription request is called while a previous request is in process.
5129Repeated unsubscription request is called while a previous request is in process.
5130Talker notification is already subscribed.
5131Illegible attempt to unsubscribe talker notification without subscribing first.