Live Statistics

The React Native SDK provides the following methods:

Live Media Statistics

The Enx.enableStats() method allows you to receive statistics of all the streams received in a room. These statistics help you analyze the quality of these streams. For each stream, the following information is received:

  • Publishing Resolution
  • Publisher Bandwidth
  • Receiver's Resolution
  • Receiver's Bandwidth Consumed
  • Receiver's Available Bandwidth

Methods: enableStats(isEnabled), enablePlayerStats(isEnabled, streamId)

enableStats(isEnabled)

Parameters

Parameter Data Type Description
isEnabled Boolean
  • true - enable
  • false - disable

enablePlayerStats(isEnabled, streamId)

Parameters

Parameter Data Type Description
isEnabled Boolean
  • true - display of Stats on respective.
  • false - hide display of Stats on respective.
streamId String The stream ID for which stats are to be displayed on Player.

Callbacks

Callback Data Type Description
acknowledgeStats JSONObject To notify the endpoint that stream stats are enabled or disabled.
receivedStats JSONObject Receiving updated stats of all streams.
playerStats JSONObject Receiving updated stats of a stream.

Talker and Noise Notification

The Enx.subscribeForTalkerNotification() method 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 debugging.

Method: subscribeForTalkerNotification(isEnabled)

Parameter: isEnabled: Boolean. true - to receive notifications
false - to not receive notifications.

Callbacks

CallbackData TypeDescription
AckSubscribeTalkerNotificationJSON ObjectAcknowledgment to the subscriber when Talker Notification subscribed successfully.
AckUnsubscribeTalkerNotificationJSON ObjectAcknowledgment to the subscriber when Talker Notification unsubscribed successfully.
TalkerNotificationJSON ObjectNotification to the subscriber received with JSON Object carrying the details of users from whom speech or sound is detected.

Sample Code

Enx.subscribeForTalkerNotification(isEnabled) // isEnabled=true/false. True means subscribe and false means unsubscribe
ackSubscribeTalkerNotification:event=>{
// Acknowledgement on Talker Subscription
}
ackUnsubscribeTalkerNotification:event=>{
// Acknowledgement on Talker Unsubscription
}
talkerNotification:event=>{
// Receive Talker Notification on Subscription
}