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: -(void)enableStats:(BOOL)isEnabled
Parameter:
isEnabled
– BOOL. Set to true to enable stats and false to disable them.
Delegate Method:
-didAcknowledgeStats:
– Acknowledgment to the user when stream stats are enabled or disabled.-didReceiveStats:
– Notification to the user when all streams stats is received.
// To enable stats at Room Level
[enxRoom enableStats:true];
// To get to know stats has been enabled or disabled
-(void)didAcknowledgeStats: ( NSArray * _Nonnull)subUnSubResponse{
}
//Delegate to receive room level stats
-(void)didReceiveStats: ( NSArray * _Nonnull)statsData{
}
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: -(void)enablePlayerStats:(BOOL)isEnabled
Parameter:
isEnabled
– BOOL. Set to true to enable stats and false to disable.
Delegate Method:
-didPlayerStats:
– Notification to the user when player’s stream stats is received.
// To enable player's stream stats
[enxPlayer enablePlayerStats:true];
//Delegate to receive player's stream stats
-(void)didPlayerStats: ( NSArray * _Nonnull)statsData{
}
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. |