onRoomStats method
@detail callback
@author yejing
@brief Room call statistics callback.
After the user enters the room and starts the call, he receives this callback every 2s.
@param stats Summary statistics in the room. See RTCRoomStats{@link #RTCRoomStats}.
Implementation
FutureOr<void> onRoomStats(dynamic stats) async {
if ($instance == null || $instance is! IRTCRoomEventHandler) {
return;
}
return ($instance as IRTCRoomEventHandler).onRoomStats?.call(packObject(
stats,
() => RTCRoomStats.fromMap(RTCRoomStats.deepPackedMapValues(
RTCRoomStats.mapMemberToConstructorParams(stats)))));
}