Package org.openhab.binding.xbmc.rpc.calls

Examples of org.openhab.binding.xbmc.rpc.calls.PlayerGetActivePlayers


   * @param updatePolledPropertiesOnly
   *       If updatePolledPropertiesOnly is true, only update the Player properties that need to be polled
   *       If updatePolledPropertiesOnly is false, update the Player state itself as well
   */
  public void updatePlayerStatus(final boolean updatePolledPropertiesOnly) {
    final PlayerGetActivePlayers activePlayers = new PlayerGetActivePlayers(client, httpUri);
   
    activePlayers.execute(new Runnable() {
      @Override
      public void run() {
        if (activePlayers.isPlaying()) {
          if (!updatePolledPropertiesOnly) {
            updateState(State.Play);
          }
          requestPlayerUpdate(activePlayers.getPlayerId(), updatePolledPropertiesOnly);
        } else {
          if (!updatePolledPropertiesOnly) {
            updateState(State.Stop);
          }
        }
View Full Code Here


      }
    });
  }

  public void playerPlayPause() {
    final PlayerGetActivePlayers activePlayers = new PlayerGetActivePlayers(client, httpUri);
   
    activePlayers.execute(new Runnable() {
      public void run() {
        PlayerPlayPause playPause = new PlayerPlayPause(client, httpUri);
        playPause.setPlayerId(activePlayers.getPlayerId());
        playPause.execute();
      }
    });
  }
View Full Code Here

      }
    });
  }
 
  public void playerStop() {
    final PlayerGetActivePlayers activePlayers = new PlayerGetActivePlayers(client, httpUri);
   
    activePlayers.execute(new Runnable() {
      public void run() {
        PlayerStop stop = new PlayerStop(client, httpUri);
        stop.setPlayerId(activePlayers.getPlayerId());
        stop.execute();
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.openhab.binding.xbmc.rpc.calls.PlayerGetActivePlayers

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.