onRoomUserCountChanged method

void onRoomUserCountChanged(
  1. String roomId,
  2. int userCount
)

Implementation

void onRoomUserCountChanged(String roomId, int userCount) {
  if (userCount > 0) {
    roomState.userCount.value = userCount - 1;
    if (userCount > roomState.liveExtraInfo.maxAudienceCount) {
      roomState.liveExtraInfo.maxAudienceCount = userCount - 1;
    }
  }
}