monitorStats method
override
Implementation
@override
Future<bool> monitorStats() async {
if (receiver == null && events.isDisposed) {
_currentBitrate = 0;
return false;
}
final stats = await getReceiverStats();
if (stats != null && prevStats != null && receiver != null) {
_currentBitrate = computeBitrateForReceiverStats(stats, prevStats);
events.emit(VideoReceiverStatsEvent(
stats: stats, currentBitrate: currentBitrate));
}
prevStats = stats;
return true;
}