aws / amazon-chime-sdk-ios

An iOS client library for integrating multi-party communications powered by the Amazon Chime service.
https://aws.amazon.com/chime/chime-sdk/
Apache License 2.0
144 stars 67 forks source link

Question: How to get peer connection metrics (RTCStatsReport)? #534

Open yulian948 opened 1 year ago

yulian948 commented 1 year ago

In https://github.com/aws/amazon-chime-sdk-js there is a ClientMetricReport class, which contains RTCStatsReport. Is there anything similar in the Chime iOS SDK? Currently, I only see the MetricsObserver::metricsDidReceive method, which returns a dictionary of metrics but is limited to the metrics defined in ObservableMetric enum.

alnlau commented 1 year ago

Hello,

Currently we only have the metrics defined in ObservableMetric. I'll mark this as a feature request for additional metrics similar to RTCStatsReport in amazon-chime-sdk-js. Is there a particular metric that you were looking for?

yulian948 commented 1 year ago

Thanks for your answer @alnlau! It would be awesome to have access to RTCStatsReport. No particular metric, I just want to have more of them available, the same as I have when using WebRTC.

In the meantime, while looking through the code, I found ClientMetricsCollector protocol which is implemented by DefaultClientMetricsCollector class. There is a comment in that protocol:

... takes the raw metrics from the native client ...

Does it mean that I can implement that protocol in my app and receive more metrics than currently available through ObservableMetric enum?

yulian948 commented 1 year ago

Answering my previous question: It is not possible to implement ClientMetricsCollector protocol and use own implementation instead of DefaultClientMetricsCollector, because it is not possible to replace it in DefaultMeetingSession.swift.

Kishimotovn commented 10 months ago

Bump this as we need something similar to audioDownstreamJitterMs , audioUpstreamJitterMs and audioUpstreamRoundTripTimeMs which are all implemented in the js sdk