Package org.red5.server.api

Examples of org.red5.server.api.IConnection


    }
  }
 
  public List<ScreenSharingMessage> checkSharingSession() {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      HashMap<String,RoomClient> roomClientList = this.clientListManager.getClientListByRoom(currentClient.getRoom_id());
     
      List<ScreenSharingMessage> screenSharingMessageList = new LinkedList<ScreenSharingMessage>();
     
View Full Code Here


    return null;
  }
 
  public void registerViewerSession(boolean register, String publicSID) {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      if (register) {
        //Add User to Session
        currentClient.getSharerSIDs().add(publicSID);
      } else {
        //Remove User from Session
        currentClient.getSharerSIDs().remove(publicSID);
       
      }
     
      //currentClient.setViewer(register);
     
      this.clientListManager.updateClientByStreamId(current.getClient().getId(), currentClient);
     
    } catch (Exception err) {
      log.error("[checkSharingSession] ",err);
    }
  }
View Full Code Here

  }
 

  public boolean checkSharerSession() {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      ServerSharingSessionBean serverSharingSessionBean = ServerSharingSessionList.getServerSharingSessionBeanByPublicSID(currentClient.getPublicSID());
     
      if (serverSharingSessionBean == null) {
        return true;
View Full Code Here

     
      Collection<Set<IConnection>> conCollection = null;
     
      if (currentClient == null) {
        //Must be from a previous session, search for user in current scope
        IConnection current = Red5.getConnectionLocal();
        //Notify all Clients of that Scope (Room)
        conCollection = current.getScope().getConnections();
      else {
        //default Scope Name
        String scopeName = "hibernate";
        if (currentClient.getRoom_id() != null) {
          scopeName = currentClient.getRoom_id().toString();
View Full Code Here

  }
 
  public synchronized Boolean getInterviewRecordingStatus() {
    try {
     
      IConnection current = Red5.getConnectionLocal();
     
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
           
            RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
View Full Code Here

  }
 
  public synchronized Boolean startInterviewRecording() {
    try {
     
      IConnection current = Red5.getConnectionLocal();
     
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
           
            RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
           
            if (rcl.getIsRecording() != null && rcl.getIsRecording()) {
              return false;
            }
           
          }
        }
      }
     
     
     
      RoomClient current_rcl = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      //String publicSID = current_rcl.getPublicSID();
     
      //Also set the Recording Flag to Record all Participants that enter later
      current_rcl.setIsRecording(true);
      this.clientListManager.updateClientByStreamId(current.getClient().getId(), current_rcl);
     
     
      Map<String,String> interviewStatus = new HashMap<String,String>();
      interviewStatus.put("action", "start");
     
View Full Code Here

  }
 
  public synchronized Boolean sendRemoteCursorEvent(String streamid, Map messageObj) {
    try {
     
      IConnection current = Red5.getConnectionLocal();
     
      boolean found = false;
      Long flvRecordingId = null;
     
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
           
            RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
View Full Code Here

  }
 
  public synchronized Boolean stopInterviewRecording() {
    try {
     
      IConnection current = Red5.getConnectionLocal();
     
      boolean found = false;
      Long flvRecordingId = null;
     
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
           
            RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
           
            if (rcl.getIsRecording() != null && rcl.getIsRecording()) {
             
              rcl.setIsRecording(false);
             
              flvRecordingId = rcl.getFlvRecordingId();
             
              rcl.setFlvRecordingId(null);
             
              //Reset the Recording Flag to Record all Participants that enter later
              this.clientListManager.updateClientByStreamId(conn.getClient().getId(), rcl);
             
              found = true;
            }
           
          }
        }
      }
     
      if (!found) {
        return false;
      }
     
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
     
      this.flvRecorderService.stopRecordAndSave(scope, currentClient, flvRecordingId);
     
      Map<String,String> interviewStatus = new HashMap<String,String>();
View Full Code Here

   * @return
   */
  public synchronized HashMap<String,RoomClient> getClientListScope(){
    HashMap <String,RoomClient> roomClientList = new HashMap<String,RoomClient>();
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      log.debug("xmlcrm getClientListScope: "+currentClient.getUsername());     
      Long room_id = currentClient.getRoom_id()
             
      return this.clientListManager.getClientListByRoom(room_id);
     
View Full Code Here

   */
  @Override
  public synchronized void streamPublishStart(IBroadcastStream stream) {
    try {
      log.debug("-----------  streamPublishStart");
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);

      //We make a second object the has the reference to the object
      //that we will use to send to all participents
      Client clientObjectSendToSync = currentClient;
     
      // Notify all the clients that the stream had been started
      log.debug("start streamPublishStart broadcast start: "
          + stream.getPublishedName() + " CONN " + current);

      // In case its a screen sharing we start a new Video for that
      if (currentClient.getIsScreenClient()) {

        currentClient.setScreenPublishStarted(true);

        this.sessionManager.updateClientByStreamId(current
            .getClient().getId(), currentClient, false, null);
      }
      //If its an audio/video client then send the session object with the full
      //data to everybody
      else if (currentClient.getIsAVClient()) {
        clientObjectSendToSync = this.sessionManager.getClientByPublicSID(
                      currentClient.getPublicSID(), false, null);
      }
     
      log.debug("newStream SEND: "+currentClient);

      // Notify all users of the same Scope
      // We need to iterate through the streams to catch if anybody is recording
      for (Set<IConnection> conset : current.getScope().getConnections()) {
      for (IConnection conn : conset) {
        if (conn != null) {
          if (conn instanceof IServiceCapableConnection) {
           
            Client rcl = this.sessionManager
View Full Code Here

TOP

Related Classes of org.red5.server.api.IConnection

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.