Fixed remotecontrol bug

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-25 11:43:10 +02:00
parent 24ec616da5
commit 5ac07f6dd0
5 changed files with 12 additions and 10 deletions

View File

@@ -18,7 +18,6 @@ var Hostcontroller = {
ytplayer.setVolume(arr[1]);
localStorage.setItem("volume", arr[1]);
Playercontrols.choose_button(arr[1], false);
ytplayer.loadVideoById('mockmaster');
}else if(arr[0] == "channel")
{
socket.emit("change_channel");
@@ -34,7 +33,7 @@ var Hostcontroller = {
else if(arr[0] == "play")
ytplayer.playVideo();
else if(arr[0] == "skip")
skip();
List.skip();
});
}
});

View File

@@ -27,11 +27,13 @@ $("#skipbutton").on("click", function()
socket.emit("id", [id, "skip", "mock"]);
});
/*
document.getElementById("volume-control").addEventListener("click", function()
$("#remoteform").on("submit", function()
{
socket.emit("id", [id, "volume", $("#volume-control").val()]);
});*/
if(start)
window.location.href = '/remote/'+document.getElementById("remoteform").chan.value;
else
control();
});
function control()
{
@@ -43,7 +45,7 @@ function control()
$(".rc").css("display", "block");
document.getElementById("base").setAttribute("onsubmit", "control(); return false;");
//document.getElementById("base").setAttribute("onsubmit", "control(); return false;");
$("#remote-text").text("Controlling "+ id)
document.getElementById("search").setAttribute("length", "18");
document.getElementById("search").setAttribute("maxlength", "18");
@@ -61,6 +63,7 @@ function control()
},*/
stop:function(event, ui) {
socket.emit("id", [id, "volume", ui.value]);
console.log("volume");
//console.log(ui.value);
}
});