Package org.red5.server

Examples of org.red5.server.Context


    return false;
  }
 
  public RoomPoll getVotes(){
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient rc =this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      //get Poll
      return pollList.get(rc.getRoom_id())
    } catch (Exception err) {
      log.error("[getVotes]",err);
View Full Code Here


    return null;
  }
 
  public RoomPoll getPoll(){
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient rc = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      //get Poll
      return pollList.get(rc.getRoom_id());
    } catch (Exception err) {
      log.error("[getPoll]",err);
View Full Code Here

    return null;
  }
 
  public int checkHasVoted(){
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient rc = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      //get Poll
      RoomPoll roomP = pollList.get(rc.getRoom_id());
     
      if (roomP!=null){
View Full Code Here

 
 
  public Map getAppointMentAndTimeZones(Long room_id){
    log.debug("getAppointMentDataForRoom");
   
    IConnection current = Red5.getConnectionLocal();
    String streamid = current.getClient().getId();
   
    log.debug("getCurrentRoomClient -2- "+streamid);
   
    RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
   
View Full Code Here

   * @return
   */
  public String recordMeetingStream(String conferenceType, Object initwhiteboardvars,
      String roomRecordingsTableString, String comment){
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();

      String recordingName = generateFileName(Long.valueOf(currentClient.getBroadCastID()).toString());
      currentClient.setIsRecording(true);
      currentClient.setRoomRecordingName(recordingName);     
      this.clientListManager.updateClientByStreamId(current.getClient().getId(), currentClient);
     
      Date now = new Date();
     
      RoomRecording roomRecording = new RoomRecording();
      roomRecording.setConferenceType(conferenceType);
      roomRecording.setRoom_setup(Roommanagement.getInstance().getRoomById(currentClient.getRoom_id()));
      roomRecording.setRoomRecordingsTableString(roomRecordingsTableString);
      roomRecording.setStarttime(now);
      roomRecording.setComment(comment);
     
      //get all stream and start recording them
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
View Full Code Here

    return null;
  }
 
  public Long _stopRecordMeetingStream(String roomrecordingName){
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());

      RoomRecording roomRecording = roomRecordingList.get(roomrecordingName);
      Long room_id = currentClient.getRoom_id()

      String conferenceType = roomRecording.getConferenceType();
     
      //get all stream and stop recording them
      //Todo: Check that nobody does Recording at the same time Issue 253
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
              log.debug("is this users still alive? :"+rcl);
              //Check if the Client is in the same room and same domain
              if(room_id.equals(rcl.getRoom_id()) && room_id!=null){
                ((IServiceCapableConnection) conn).invoke("stopedRecording",new Object[] { currentClient }, this);
              }
            }
          }   
        }
      }
     
      return _stopRecordAndSave(current.getScope(), roomrecordingName, currentClient);
    } catch (Exception err) {
      log.error("[stopRecordAndSave]",err);
    }
    return new Long(-1);
  }
View Full Code Here

 

  public Long _clientCancelRecording(String roomrecordingName){
    try {
     
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();
      currentClient.setIsRecording(false);
      currentClient.setRoomRecordingName("");
      this.clientListManager.updateClientByStreamId(current.getClient().getId(), currentClient);
     
      RoomRecording roomRecording = roomRecordingList.get(roomrecordingName);
      String conferenceType = roomRecording.getConferenceType();
     
      //get all stream and stop recording them
      //Todo: Check that nobody does Recording at the same time Issue 253
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
View Full Code Here

   * @deprecated
   * @return
   */
  public RoomClient checkForRecording(){
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();
     
      //Check if any client in the same room is recording at the moment
     
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection cons : conset) {
          if (cons != null) {
            if (cons instanceof IServiceCapableConnection) {
              if (!cons.equals(current)){
View Full Code Here

  public boolean roomJoin(IClient client, IScope room) {
    log.debug("roomJoin : ");
   
    try {
     
      IConnection conn = Red5.getConnectionLocal();
      IServiceCapableConnection service = (IServiceCapableConnection) conn;
      String streamId = client.getId();
     
      log.debug("### Client connected to OpenMeetings, register Client StreamId: "
          + streamId + " scope "+ room.getName() );
     
      //Set StreamId in Client
      service.invoke("setId", new Object[] { streamId },this);

      String swfURL = "";
      if (conn.getConnectParams().get("swfUrl") != null) {
        swfURL = conn.getConnectParams().get("swfUrl").toString();
      }
     
      RoomClient rcm = this.clientListManager.addClientListItem(streamId, room.getName(), conn.getRemotePort(),
          conn.getRemoteAddress(), swfURL);
     
      //Log the User
      ConferenceLogDaoImpl.getInstance().addConferenceLog("ClientConnect", rcm.getUser_id(),
          streamId, null, rcm.getUserip(), rcm.getScope(),
          rcm.getExternalUserId(), rcm.getExternalUserType(),
View Full Code Here

  }
 
  public synchronized Map screenSharerAction(Map map) {
    try {
     
      IConnection current = Red5.getConnectionLocal();
      IServiceCapableConnection service = (IServiceCapableConnection) current;
     
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      Map returnMap = new HashMap();
      returnMap.put("result", "stopAll");
     
     
      log.debug("-----------  ");
     
      if (currentClient != null) {
       
        boolean stopStreaming = Boolean.valueOf(map.get("stopStreaming").toString());
        boolean stopRecording = Boolean.valueOf(map.get("stopRecording").toString());
       
       
        if (stopStreaming) {
         
          log.debug("start streamPublishStart Is Screen Sharing -- Stop ");
         
          //Notify all users of the same Scope
          Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
          for (Set<IConnection> conset : conCollection) {
            for (IConnection conn : conset) {
              if (conn != null) {
                if (conn instanceof IServiceCapableConnection) {
                  if (conn.equals(current)){
                    continue;
                  } else {
                    RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
                    //log.debug("is this users still alive? :"+rcl);
                    //Check if the Client is in the same room and same domain
                    if (rcl == null) {
                      //continue;
                    } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                        //continue;
                      } else {
                      IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
                      //log.info("IServiceCapableConnection ID " + iStream.getClient().getId());
                      iStream.invoke("stopRed5ScreenSharing",new Object[] { currentClient }, this);
                      log.debug("send Notification to");
                    }
                  }
                }
              }
            }
          }
         
          if (currentClient.isStartRecording()) {
           
            returnMap.put("result", "stopSharingOnly");
           
          }
         
          currentClient.setStartStreaming(false);
          currentClient.setScreenPublishStarted(false);
         
          this.clientListManager.updateClientByStreamId(currentClient.getStreamid(), currentClient);
         
        }
       
        if (stopRecording) {
         
          if (currentClient.isStartStreaming()) {
            returnMap.put("result", "stopRecordingOnly");
          }
         
          //Notify all users of the same Scope
          Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
          for (Set<IConnection> conset : conCollection) {
            for (IConnection conn : conset) {
              if (conn != null) {
                if (conn instanceof IServiceCapableConnection) {
                  if (conn.equals(current)){
                    continue;
                  } else {
                    RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
                    //log.debug("is this users still alive? :"+rcl);
                    //Check if the Client is in the same room and same domain
                    if (rcl == null) {
                      //continue;
                    } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                        //continue;
                      } else {
                      IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
                      //log.info("IServiceCapableConnection ID " + iStream.getClient().getId());
                      iStream.invoke("stopRecordingMessage",new Object[] { currentClient }, this);
                      log.debug("send Notification to");
                    }
                  }
                }
              }
            }
          }
         
          this.flvRecorderService.stopRecordAndSave(current.getScope(), currentClient, null);
         
          currentClient.setStartRecording(false);
          currentClient.setIsRecording(false);
         
          this.clientListManager.updateClientByStreamId(currentClient.getStreamid(), currentClient);
View Full Code Here

TOP

Related Classes of org.red5.server.Context

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.