twilio / video-quickstart-android

Twilio Video Quickstart for Android
MIT License
212 stars 159 forks source link

How do we get RTCStatsReport using twilio android sdk. #732

Closed krunalspearline closed 1 year ago

krunalspearline commented 1 year ago

I really appreciate your help for the same. Thanks in advance!!

krunalspearline commented 1 year ago

I have found method getRtcStats(@NonNull RtcStatsListener rtcStatsListener) inside the Room class but this method is not public and not accessible publicly. Is there any otherway where we can get the List<RTCStatsReport>?

Thanks in advance!!

afalls-twilio commented 1 year ago

@krunalspearline Thank you for the question. While its not the exact WebRTC API, it does contain much of the same information. This is accomplished by using the Room object ie.. 1) register an object implementing the StatsListener interface using the getStats(..) method from the Room object. 2) This call back will be invoked when stats arrive and can include a whole variety of information.. Please look at the StatsReport object for more details.