1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-10-27 11:57:41 +00:00

Add crossfade support. Not sure about the icon/glyph though

This commit is contained in:
ajs124
2015-02-17 15:45:26 +01:00
parent e6e93a08c7
commit 3eb12e6ecd
4 changed files with 18 additions and 1 deletions

View File

@@ -134,6 +134,9 @@
<button id="btnsingle" type="button" class="btn btn-default">
<span class="glyphicon glyphicon-star"></span> Single
</button>
<button id="btncrossfade" type="button" class="btn btn-default">
<span class="glyphicon glyphicon-link"></span> Crossfade
</button>
<button id="btnrepeat" type="button" class="btn btn-default">
<span class="glyphicon glyphicon-repeat"></span> Repeat
</button>

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));
});