Stopped using jQuery UI

This commit is contained in:
Kasper Rynning-Tønnesen
2018-04-23 16:42:43 +02:00
parent 5adf770af0
commit daa5f16945
13 changed files with 388 additions and 121 deletions

View File

@@ -39,16 +39,27 @@ var Mobile_remote = {
},
initiate_volume: function() {
$("#volume-control-remote").slider({
min: 0,
max: 100,
value: 100,
range: "min",
animate: true,
stop:function(event, ui) {
socket.emit("id", {id: Mobile_remote.id, type: "volume", value: ui.value});
}
});
var vol = 100;
$("#volume-control-remote").append("<div class='volume-slid-remote'></div>");
$("#volume-control-remote").append("<div class='volume-handle-remote'></div>");
$(".volume-slid-remote").css("width", vol + "%");
$(".volume-handle-remote").css("left", "calc(" + vol + "% - 1px)");
document.getElementById("volume-control-remote").onmousedown = function(e) {
e.preventDefault();
Playercontrols.dragMouseDown(e);
}
document.getElementById("volume-control-remote").touchstart = function(e) {
e.preventDefault();
Playercontrols.dragMouseDown(e);
}
document.getElementById("volume-control-remote").touchmove = function(e) {
e.preventDefault();
Playercontrols.dragMouseDown(e);
}
document.getElementById("volume-control-remote").onclick = function(e) {
Playercontrols.elementDrag(e);
Playercontrols.closeDragElement();
}
}
};