mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed remotecontrol bug
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user