How to get media stats from peer connection
Table of Contents
Take Peerconection_client as example
step 1
class RtcStatsRecorder : public webrtc::RTCStatsCollectorCallback {
public:
void OnStatsDelivered(const rtc::scoped_refptr<const webrtc::RTCStatsReport>& report) override;
};
step 2
void RtcStatsRecorder::OnStatsDelivered(const rtc::scoped_refptr<const webrtc::RTCStatsReport>& report) {
RTC_LOG(LS_INFO) << report.ToJson() << endl;
}
Comments |0|
Category: Uncategorized