stopStats method
Stops WebRTC statistics reporting for the given call ID.
Awaits final stats collection to ensure no data is lost.
callId The ID of the call for which to stop stats.
Implementation
Future<void> stopStats(String callId) async {
// Stop call report collector (always) - await to capture final stats
await _callReportCollector?.stop();
GlobalLogger().i('Peer :: CallReportCollector stopped for $callId');
// Stop WebRTC stats reporter if it was started
if (_debug) {
_statsManager?.stopStatsReporting();
GlobalLogger().i('Peer :: Stats Manager stopped for $callId');
}
}