initialize method

void initialize()

Implementation

void initialize() {
  // Clear any previous measurements
  _prevStats.clear();
  _currentReceiverBitrate.clear();

  // Start collecting stats periodically
  _statsTimer = Timer.periodic(2.seconds, (timer) {
    _monitorSenderStats();
    _monitorReceiverStats();

    _recordStats();
  });
}