mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Almost working
This commit is contained in:
@@ -8,6 +8,7 @@ socket.on("id", function(id)
|
||||
$("#code-text").text(id.toUpperCase())
|
||||
$("#code-qr").attr("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+codeURL);
|
||||
$("#code-link").attr("href", codeURL);
|
||||
|
||||
if(!began)
|
||||
{
|
||||
socket.on(id, function(arr)
|
||||
|
||||
@@ -27,14 +27,19 @@ document.getElementById("remote_skip").addEventListener("click", function()
|
||||
|
||||
document.getElementById("volume-control").addEventListener("click", function()
|
||||
{
|
||||
socket.emit("id", [id, "volume", $("#volume-control").val()]);
|
||||
console.log("Sending...")
|
||||
socket.emit("id", [id, "volume", $("#volume-control").val()]);
|
||||
console.log("Sent new vol signal")
|
||||
});
|
||||
|
||||
function control()
|
||||
{
|
||||
console.log("Start controlling")
|
||||
if(start)
|
||||
{
|
||||
if(!id)id = $("#code-input").val().toLowerCase();
|
||||
if($("#code-input").val())
|
||||
id = $("#code-input").val().toLowerCase();
|
||||
console.log("id="+id)
|
||||
$("#code-input").val("");
|
||||
start = false;
|
||||
|
||||
@@ -49,5 +54,5 @@ function control()
|
||||
socket.emit("id", [id, "channel", $("#code-input").val().toLowerCase()]);
|
||||
$("#code-input").val("");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user