Exemple #1
0
  private void removeParticipant(String name) {

    checkClosed();

    participants.remove(name);

    log.debug("ROOM {}: notifying all users that {} is leaving the room", this.name, name);

    final JsonObject participantLeftJson = new JsonObject();
    participantLeftJson.addProperty("id", "participantLeft");
    participantLeftJson.addProperty("name", name);
    for (final RoomParticipant participant : participants.values()) {
      participant.cancelSendingVideoTo(name);
      participant.sendMessage(participantLeftJson);
    }
  }