I've recently mentioned that starting with beaTunes 5.0.3 there is a mechanism that allows limited remote control of beaTunes from another process. This mechanism is pretty straight forward:
- Start beaTunes
- Locate the
Let's assume you're on macOS and have installed beaTunes in the regular
/Applications folder. Then
beaTunes5rc is located at
/Applications/beaTunes5.app/Contents/MacOS/beaTunes5rc (on Windows, a similar executable is located in the installation directory). A handy action id to use is
audioplayer.pause.play. So to toggle play/pause from another program or the commandline/terminal, simply execute:
As return value you'll usually get a JSON document similar to this one:
In beaTunes most UI actions have an id and therefore can be triggered via this mechanism. A couple of these ids are listed in the API for RemoteControlService. However, the best way to find valid ids is to ask
beaTunes5rc itself. To do so, simply call:
This will return a JSON-formatted list of valid ids, often along with short descriptions.
Additionally to a simple status message some actions may return useful information. To get information about the currently playing song, you can e.g. use
The mechanism can be used integrate beaTunes with 3rd party applications, like BeardedSpice. And if you'd like to see a beaTunes integration with BeardedSpice, feel free to upvote the corresponding pull request.