Package com.kurento.demo.common

Examples of com.kurento.demo.common.WebRTCParticipant


    if (existName(name)) {
      session.terminate(403, "User " + name + " is already in the room. "
          + "Please select another name and try again.");
    } else {
      WebRtcEndpoint endpoint = mp.newWebRtcEndpoint().build();
      WebRTCParticipant participant = new WebRTCParticipant(
          session.getSessionId(), name, endpoint, session);
      participant.endpoint.connect(participant.endpoint);
      session.start(participant.endpoint);
      session.setAttribute("participant", participant);
      participants.put(participant.getId(), participant);
      notifyJoined(participant);
    }
  }
View Full Code Here


  }

  @Override
  public synchronized void onSessionTerminated(WebRtcContentSession session,
      int code, String reason) throws Exception {
    WebRTCParticipant participant = (WebRTCParticipant) session
        .getAttribute("participant");
    participants.remove(participant.getId());
    notifyUnjoined(participant);

    if (participants.isEmpty()) {
      getLogger().info("Clearing room");
      mp = null;
View Full Code Here

    super.onSessionTerminated(session, code, reason);
  }

  private boolean selectParticipant(WebRtcContentSession session,
      String partId) {
    WebRTCParticipant partSelected = participants.get(partId);
    if (partSelected == null) {
      getLogger().error("Participant {} does not exist", partId);
      return false;
    }
    partSelected.endpoint.connect(((WebRTCParticipant) session
View Full Code Here

        .getAttribute("participant")).endpoint);
    return true;
  }

  private boolean connectParticipant(String origId, String destId) {
    WebRTCParticipant orig = participants.get(origId);
    if (orig == null) {
      getLogger().error("Participant {} does not exist", origId);
      return false;
    }
    WebRTCParticipant dest = participants.get(destId);
    if (dest == null) {
      getLogger().error("Participant {} does not exist", destId);
      return false;
    }
    orig.endpoint.connect(dest.endpoint);
View Full Code Here

TOP

Related Classes of com.kurento.demo.common.WebRTCParticipant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.