Examples of AudioTreatmentRequestMessage


Examples of org.jdesktop.wonderland.modules.audiomanager.common.messages.AudioTreatmentRequestMessage

        String label = event.getContextMenuItem().getLabel();
        CellID cellID = cell.getCellID();
        if (PLAY.equals(label) || RESUME.equals(label)) {

            addMenuItems(new String[] {STOP, PAUSE, VOLUME});
            channelComp.send(new AudioTreatmentRequestMessage(cellID, false, false));
            return;
        }

        if (PAUSE.equals(label)) {
            addMenuItems(new String[] {STOP, RESUME, VOLUME});
            channelComp.send(new AudioTreatmentRequestMessage(cellID, false, true));
            return;
        }

        if (VOLUME.equals(label)) {
      String softphoneCallID = SoftphoneControlImpl.getInstance().getCallID();

      if (volumeControlJFrame == null) {
          volumeControlJFrame = new VolumeControlJFrame(this, "");
      }

            volumeControlJFrame.setLocationRelativeTo(
                    JmeClientMain.getFrame().getFrame());
      volumeControlJFrame.setVisible(true);
      return;
        }

        if (!(STOP.equals(label))) {
            return;
        }

        addMenuItems(new String[] {PLAY, VOLUME});
        channelComp.send(new AudioTreatmentRequestMessage(cellID, true, true));
    }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.audiomanager.common.messages.AudioTreatmentRequestMessage

    }

    private void receive(CellMessage message) {
  if (message instanceof AudioTreatmentDoneMessage) {
      addMenuItems(new String[] {PLAY, VOLUME});
      channelComp.send(new AudioTreatmentRequestMessage(cell.getCellID(), true, true));
      return;
  }

  if (message instanceof AudioTreatmentEndedMessage) {
      AudioTreatmentEndedMessage msg = (AudioTreatmentEndedMessage) message;
View Full Code Here

Examples of org.jdesktop.wonderland.modules.audiomanager.common.messages.AudioTreatmentRequestMessage

        public void messageReceived(WonderlandClientSender sender, WonderlandClientID clientID,
                CellMessage message) {

            if (message instanceof AudioTreatmentRequestMessage) {
                AudioTreatmentRequestMessage msg = (AudioTreatmentRequestMessage) message;
                logger.fine("Got AudioTreatmentRequestMessage, startTreatment="
        + msg.restartTreatment());

              String treatmentId = CallID.getCallID(cellID);

          Treatment treatment = null;

    treatment = AppContext.getManager(VoiceManager.class).getTreatment(treatmentId);

    if (treatment == null) {
        logger.warning("Can't find treatment " + treatmentId);
        return;
    }

    logger.fine("restart " + msg.restartTreatment() + " pause " + msg.isPaused());

    if (msg.restartTreatment()) {
        treatment.restart(msg.isPaused());
    } else {
        treatment.pause(msg.isPaused());
    }
                return;
            }

      if (message instanceof AudioVolumeMessage) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.