Live Statistics
The React Native SDK provides the following methods:
- enableStats(): To get live statistics of each stream.
- enablePlayerStats(): To receive statistics of streams individually.
- subscribeForTalkerNotification(): To receive notification about the talkers in a room.
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 |
|
enablePlayerStats(isEnabled, streamId)
Parameters
Parameter | Data Type | Description |
---|---|---|
isEnabled |
Boolean |
|
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
Callback | Data Type | Description |
---|---|---|
AckSubscribeTalkerNotification | JSON Object | Acknowledgment to the subscriber when Talker Notification subscribed successfully. |
AckUnsubscribeTalkerNotification | JSON Object | Acknowledgment to the subscriber when Talker Notification unsubscribed successfully. |
TalkerNotification | JSON Object | Notification 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 unsubscribeackSubscribeTalkerNotification:event=>{// Acknowledgement on Talker Subscription}ackUnsubscribeTalkerNotification:event=>{// Acknowledgement on Talker Unsubscription}talkerNotification:event=>{// Receive Talker Notification on Subscription}