WebRTC Statistics API in M52 iOS

213 views
Skip to first unread message

Raju S N

unread,
Sep 29, 2016, 9:38:26 AM9/29/16
to discuss-webrtc
Hi All,

I got problem while using the Statistics API in case of WebRTC on iOS.

Using the following reference code from ARDAppClient.m (\webrtc\examples\objc\AppRTCDemo)

    __weak ARDAppClient *weakSelf = self;
    _statsTimer = [[ARDTimerProxy alloc] initWithInterval:1
                                                  repeats:YES
                                             timerHandler:^{
      ARDAppClient *strongSelf = weakSelf;
      [strongSelf.peerConnection getStatsWithDelegate:strongSelf
                                     mediaStreamTrack:nil
                                     statsOutputLevel:RTCStatsOutputLevelDebug];

There is only one callback, i am getting with following values.
(\n    \"audioInputLevel: 0\",\n    \"bytesSent: 0\",\n    \"mediaType: audio\",\n    \"packetsLost: -1\",\n    \"packetsSent: 0\",\n    \"ssrc: 2767044069\",\n    \"transportId: Channel-audio-1\",\n    \"googCodecName: PCMU\",\n    \"googEchoCancellationQualityMin: -1\",\n    \"googEchoCancellationEchoDelayMedian: -1\",\n    \"googEchoCancellationEchoDelayStdDev: -1\",\n    \"googEchoCancellationReturnLoss: -100\",\n    \"googEchoCancellationReturnLossEnhancement: -100\",\n    \"googJitterReceived: -1\",\n    \"googRtt: -1\",\n    \"googTrackId: audio0\",\n    \"googTypingNoiseState: false\"\n)"

And subsequent stats callbacks are not triggered.

Can anyone please clarify if this is the right way to use the statistics in case of iOS ?
First of all, does statistics api work in case of Native iOS ?

For mediaStreamTrack, following values are tried and none of them worked.

mediaStreamTrack:nil
mediaStreamTrack:localstream
mediaStreamTrack:remotestream

Thanks a lot
Raju

Lars Bork

unread,
Oct 29, 2016, 8:24:13 PM10/29/16
to discuss-webrtc
Hey Raju,

I am experiencing similar problems right now – have you been able to fix this issue?

Best regards,
Lars
Reply all
Reply to author
Forward
0 new messages