1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-12-22 13:32:01 +00:00

Merge pull request #52 from ajs124/master

Add crossfade support. Not sure about the icon/glyph though
This commit is contained in:
Andy
2015-03-03 21:50:49 +01:00
4 changed files with 18 additions and 1 deletions

View File

@@ -325,6 +325,11 @@ function webSocketConnect() {
else
$('#btnsingle').removeClass("active");
if(obj.data.crossfade)
$('#btncrossfade').addClass("active")
else
$('#btncrossfade').removeClass("active");
if(obj.data.repeat)
$('#btnrepeat').addClass("active")
else
@@ -488,6 +493,9 @@ $('#btnconsume').on('click', function (e) {
$('#btnsingle').on('click', function (e) {
socket.send("MPD_API_TOGGLE_SINGLE," + ($(this).hasClass('active') ? 0 : 1));
});
$('#btncrossfade').on('click', function(e) {
socket.send("MPD_API_TOGGLE_CROSSFADE," + ($(this).hasClass('active') ? 0 : 1));
});
$('#btnrepeat').on('click', function (e) {
socket.send("MPD_API_TOGGLE_REPEAT," + ($(this).hasClass('active') ? 0 : 1));
});