startStats method
Implementation
Future<bool> startStats(String callId) async {
if (_debug == false) {
_logger.d(
'Peer :: Stats manager will not start. Debug mode not enabled on config',
);
return false;
}
// Delay to allow call to be established
//ToDo(Oli) - Remove this delay, let's rely on a connection state change instead
await Future.delayed(debugStatsDelay);
if (peerConnection == null) {
_logger.d('Peer connection null');
return false;
}
_statsManager = WebRTCStatsReporter(_socket, peerConnection!, callId);
await _statsManager?.startStatsReporting();
_logger.d('Peer :: Stats Manager started for $callId');
return true;
}