Ejemplo n.º 1
0
  @Override
  public void streamBroadcastClose(IBroadcastStream stream) {
    String clientId = Red5.getConnectionLocal().getClient().getId();
    String userid = getUserId();
    String username = getUsername();

    log.debug(
        "{} has stopped publishing stream [{}]",
        username + "[uid=" + userid + "][clientid=" + clientId + "]",
        stream.getPublishedName());
    IConnection conn = Red5.getConnectionLocal();
    String peerId = (String) conn.getAttribute("VOICE_CONF_PEER");
    if (peerId != null) {
      super.streamPublishStart(stream);
      sipPeerManager.stopTalkStream(peerId, clientId, stream, conn.getScope());
      super.streamBroadcastClose(stream);
    }
  }