Hi ,
welcome to RuneAudio.
RuneAudio is a client server architecture, so we have software (tasks) running on your browser (javascript) and on the PI (PHP).
- client is manly implemented in /var/www/assets/js/runeui.js
- server is /var/www/commands/*
and /var/www/app/libs/runeaudio.php
For a first starting point and to get a feeling i would try this:
- modify
/var/www/command/index.php
Add this line:
sysCmd('echo "'.$_GET['cmd'].'" >> test.txt');
if ($activePlayer === 'MPD') {
sendMpdCommand($mpd, $_GET['cmd']);
sysCmd('echo "'.$_GET['cmd'].'" >> test.txt');
// debug
// runelog('--- [command/index.php] --- CLOSE MPD SOCKET <<< (1) ---','');
if (!$response) $response = readMpdResponse($mpd);
This will save all commands send from UI to mpd in a file called test.txt in /var/www/command/
play
setvol 22
next
previous
stop
From here you can call your own scripts or python programs.
Frank