Open yogeshJain0727 opened 1 year ago
@yogeshJain0727 you need to make sure to call the webRTCAdaptor.enableStats(obj.streamId);
method to enable stats. Here is an example of where it is enabled on the play.html page.
Then the updated_stats
callback will start and from there you can fetch the obj.averageIncomingBitrate
and obj.currentIncomingBitrate
.
Let us know if this still doesn't work for you, then you can provide a code sample and we can take a look.
@timantmedia, thank you for responding to us. This works for me.
Short description
I want to show the average incoming bitrate and current incoming bitrate of the current live streaming. For this, I am calling the averageIncomingBitrate() and currentIncomingBitrate() functions. However, I am getting a "this.webrtcAdaptor.currentIncomingBitrate is not a function" error in our Angular (version 14) Web Applications. Can you please help me demonstrate how to call this function? Additionally, I am not receiving the "info == 'updated_stats'" response in the callback of initWebrtc. (Ant media SDK "@antmedia/webrtc_adaptor": "^2.6.4").
Environment
Steps to reproduce
Expected behavior
When using the averageIncomingBitrate() and currentIncomingBitrate() functions, we can obtain information about the average bitrate, current bitrate, and lost packets.
Actual behavior
When using the averageIncomingBitrate() and currentIncomingBitrate() functions, I encountered an error message stating "this.webrtcAdaptor.currentIncomingBitrate is not a function."
Ask your questions on Ant Media Github Discussions