boydwilluk wroteHi Irishwill2008
Can you please post some more details on how you created your own volume controls for Spotify?
Thanks
Boydwilluk
Hi boydwilluk,
Its a bit of work. You need to create a .php file that contains get requests. (Thats how i did it). So you can access the commands like: example.com/volume.php?command=volumeup or volumedown etc. Inside them if statements, just use shell exec to run a command to do what you want. Example: command=volumeup will trigger to execute: amixer set PCM 80% or + / - to go up or down.
Read:
https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture
For more information on amixer commands or google
Then when you create the .php containing all them lovely commands! Just call them using ajax in jquery.
So, put ids on the + mute and - buttons in playback.php. (if they dont already have these) <-- cant remember if they did or not xD. Lets say you gave the + button an id of: upvolume.
Do this:
$( "#upvolume" ).on("click", function()
{
$.ajax({
url : '../command/volume.php',
data: {command: volumecommand}
}).done(function(data) {
//Update Volume Knob
//make a read command then push that info into the runeui function: setvol(data);
});
});
My way is more tight and longer to prevent bugs and delays but hope you get the drift
Enjpy!
P.s: Forgot to mention, i deleted the mpd volume and runeaudios volume controls in the end cause it was causing weird bugs to appear (Since their volume was trying to work) - i had to delete the cmd in the dom elements. I just used my own method for both which was way better cause then there would be two controls, So you had to make a toggle depending on player.
Like i said, a lot of work XD Worth it though i think!