Class RemoteControlService

  • All Implemented Interfaces:
    ApplicationComponent<BeaTunes>

    public class RemoteControlService
    extends Object
    implements ApplicationComponent<BeaTunes>

    Allows execution of BaseActions obtained via ids from ActionManager.

    To execute an action, connect to the loopback address (ipv4: 127.0.0.1) and send a UTF-8-encoded action id (see ApplicationAction.getId()) followed by a newline '\n'.

    The port to connect to can be read from the file getPortFile() (ASCII encoded). The port may not stay stable between application restarts. The file should not exist, if beaTunes is not running.

    Connections from other IP addresses than the loopback address is not allowed.

    The service usually responds with a simple, JSON-formatted status message.

    Important ids are:
    audioplayer.pause.play, audioplayer.next, audioplayer.previous, audioplayer.volume.up, audioplayer.volume.down, audioplayer.mute, audioplayer.pause, audioplayer.playing, audioplayer.track, audioplayer.image, audioplayer.love.toggle.

    To list all possible action ids, use the id list.

    Ids may change without notice. You can obtain a complete set of registered action ids from ActionManager.getActionIds().

    Author:
    Hendrik Schreiber
    See Also:
    RemoteControlClient