The EnxRoom.enableStats()
method allows you to receive Statistics for all the Streams being received in the Room. The statistics help you analyze the streaming quality of all the Streams by providing information about the Streams such as:
- Publishing Resolution
- Bandwidth at Publisher’s end
- Receiving Resolution
- Receiving Bandwidth consumed
- Available Bandwidth at Receiver’s end
Class: EnxRoom
Method: public void enableStats(isEnabled, EnxStatsObserver)
Parameters:
isEnabled
– Boolean. Set to true to enable stats and false to disable them.EnxStatsObserver
– EnxStatsObserver instance.
Callbacks:
onAcknowledgeStats
– Acknowledgment to the user when stream stats are enabled or disabled.onReceivedStats
– Notification to the user when all streams stats is received.
room.enableStats(true, this); @Override public void onAcknowledgeStats(JSONObject jsonObject) { } @Override public void onReceivedStats(JSONObject jsonObject) { Log.e("onReceivedStats", jsonObject.toString()); }
Receive Stream Statistics for Individual Streams
The EnxPlayerView.enablePlayerStats()
method allows you to individually receive statistics of Streams being played on the player. Please note, to receive individual stream stats, you also need to enable stats at room level using EnxRoom.enableStats()
method.
Class: EnxPlayerView
Method: public void enablePlayerStats( isEnabled, EnxPlayerStatsObserver)
Parameters:
isEnabled
– Boolean. Set to true to enable stats and false to disable.EnxPlayerStatsObserver
– EnxPlayerStatsObserver instance.
Callback:
onPlayerStats
– Notification to the user when player’s stream stats is received.
playerview.enablePlayerStats(true, this); @Override public void onPlayerStats(JSONObject jsonObject) { }
Error Codes / Exceptions:
Code | Description |
---|---|
5075 | Repeated Stream Stats Subscription request as a previous request is in process. |
5076 | Repeated Stream Stats Unsubscription request as a previous request is in process. |
5077 | Repeated Stream Stats request while Stream stats is already subscribed. |
5078 | Unsubscribing Stream Stats is not permitted without subscribing to it. |
5079 | Unable to unsubscribe to Stream Stats while Subscription request is in process. |
5080 | Stream Stats Unsubscription request is in process. |