Package org.red5.server.api

Examples of org.red5.server.api.IClient


      // Send to all Clients of that Scope(Room)
      for (IConnection conn : current.getScope().getClientConnections()) {
        if (conn != null) {
          if (conn instanceof IServiceCapableConnection) {
            IClient client = conn.getClient();
            if (!sendScreen && SessionVariablesUtil.isScreenClient(client)) {
              // screen sharing clients do not receive events
              continue;
            } else if (SessionVariablesUtil.isAVClient(client)) {
              // AVClients or potential AVClients do not receive events
              continue;
            } else if (!sendSelf && client.getId().equals(
                current.getClient().getId())) {
              //Do not send back to self
              continue;
            }
            ((IServiceCapableConnection) conn).invoke(
View Full Code Here


      if (scopeHibernate != null) {
        // Notify the clients of the same scope (room) with user_id

        for (IConnection conn : webAppKeyScope.getScope(scopeName).getClientConnections()) {
          IClient client = conn.getClient();
          if (SessionVariablesUtil.isScreenClient(client)) {
            // screen sharing clients do not receive events
            continue;
          } else if (SessionVariablesUtil.isAVClient(client)) {
            // AVClients or potential AVClients do not receive events
View Full Code Here

      // Notify the clients of the same scope (room) with user_id

      for (IConnection conn : conset) {
        if (conn != null) {
         
          IClient client = conn.getClient();
          if (SessionVariablesUtil.isScreenClient(client)) {
            // screen sharing clients do not receive events
            continue;
          } else if (SessionVariablesUtil.isAVClient(client)) {
            // AVClients or potential AVClients do not receive events
View Full Code Here

      Map<String, String> interviewStatus = new HashMap<String, String>();
      interviewStatus.put("action", "start");

      for (IConnection conn : current.getScope().getClientConnections()) {
        if (conn != null) {
          IClient client = conn.getClient();
          if (SessionVariablesUtil.isScreenClient(client)) {
            // screen sharing clients do not receive events
            continue;
          } else if (SessionVariablesUtil.isAVClient(client)) {
            // AVClients or potential AVClients do not receive events
View Full Code Here

      IConnection current = Red5.getConnectionLocal();

      for (IConnection conn : current.getScope().getClientConnections()) {
        if (conn != null) {
          IClient client = conn.getClient();
          if (SessionVariablesUtil.isScreenClient(client)) {
            if (conn.getClient().getId().equals(streamid)) {
              ((IServiceCapableConnection) conn).invoke(
                  "sendRemoteCursorEvent",
                  new Object[] { messageObj }, this);
View Full Code Here

      Map<String, String> interviewStatus = new HashMap<String, String>();
      interviewStatus.put("action", "stop");

      for (IConnection conn : currentScope.getClientConnections()) {
        if (conn != null) {
          IClient client = conn.getClient();
          if (SessionVariablesUtil.isScreenClient(client)) {
            // screen sharing clients do not receive events
            continue;
          } else if (SessionVariablesUtil.isAVClient(client)) {
            // AVClients or potential AVClients do not receive events
View Full Code Here

    }

  public synchronized void setSipTransport(Long room_id, String publicSID, String broadCastId) {
    log.debug("-----------  setSipTransport");
    IConnection current = Red5.getConnectionLocal();
    IClient c = current.getClient();
    String streamid = c.getId();
    // Notify all clients of the same scope (room)
    Client currentClient = sessionManager.getClientByStreamId(streamid, null);
    currentClient.setSipTransport(true);
    currentClient.setRoom_id(room_id);
    currentClient.setRoomEnter(new Date());
    currentClient.setFirstname("SIP Transport");
    currentClient.setLastname(getSipTransportLastname(room_id));
    currentClient.setBroadCastID(Long.parseLong(broadCastId));
    currentClient.setIsBroadcasting(true);
    currentClient.setPublicSID(publicSID);
    currentClient.setVWidth(120);
    currentClient.setVHeight(90);
    currentClient.setPicture_uri("phone.png");
    sessionManager.updateClientByStreamId(streamid, currentClient, false, null);
    SessionVariablesUtil.initClient(c, false, publicSID);

    for (IConnection conn : current.getScope().getClientConnections()) {
      if (conn != null) {
        IClient client = conn.getClient();
        if (SessionVariablesUtil.isScreenClient(client)) {
          // screen sharing clients do not receive events
          continue;
        } else if (SessionVariablesUtil.isAVClient(client)) {
          // AVClients or potential AVClients do not receive events
          continue;
        }

        if (!client.getId().equals(current.getClient().getId())) {
          // It is not needed to send back that event to the actual Moderator
          // as it will be already triggered in the result of this Function in the Client
          if (conn instanceof IServiceCapableConnection) {
            ((IServiceCapableConnection) conn).invoke("addNewUser", new Object[] { currentClient }, this);
            log.debug("sending setSipTransport to " + conn);
View Full Code Here

      // broadcast to everybody in the room/domain
      for (IConnection conn : current.getScope().getClientConnections()) {
        if (conn != null) {
          if (conn instanceof IServiceCapableConnection) {
            IClient client = conn.getClient();
            if (SessionVariablesUtil.isScreenClient(client)) {
              // screen sharing clients do not receive events
              continue;
            } else if (SessionVariablesUtil.isAVClient(client)) {
              // AVClients or potential AVClients do not receive events
View Full Code Here

    boolean success = false;
    // hit the super class first
    if (super.connect(conn, scope, params)) {
      if (log.isInfoEnabled() && ScopeUtils.isApp(scope)) {
        // log w3c connect event
        IClient client = conn.getClient();
        if (client == null) {
          log.info("W3C x-category:session x-event:connect c-ip:{}", conn.getRemoteAddress());
        } else {
          log.info("W3C x-category:session x-event:connect c-ip:{} c-client-id:{}", conn.getRemoteAddress(), client.getId());
        }
      }
      if (ScopeUtils.isApp(scope)) {
        success = appConnect(conn, params);
      } else if (ScopeUtils.isRoom(scope)) {
View Full Code Here

  @Override
  public void disconnect(IConnection conn, IScope scope) {
    log.debug("disconnect: {} < {}", conn, scope);
    if (log.isInfoEnabled() && ScopeUtils.isApp(scope)) {
      // log w3c connect event
      IClient client = conn.getClient();
      if (client == null) {
        // log w3c connect event
        log.info("W3C x-category:session x-event:disconnect c-ip:{}", conn.getRemoteAddress());
      } else {
        // log w3c connect event
        log.info("W3C x-category:session x-event:disconnect c-ip:{} c-client-id:{}", conn.getRemoteAddress(), client.getId());
      }
    }
    if (ScopeUtils.isApp(scope)) {
      appDisconnect(conn);
    } else if (ScopeUtils.isRoom(scope)) {
View Full Code Here

TOP

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

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.