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:
@@ -61,7 +61,7 @@
|
|||||||
<input type="range" title="Volume" id="volume-control" style="display:none;" min="0" value="100" max="100" />
|
<input type="range" title="Volume" id="volume-control" style="display:none;" min="0" value="100" max="100" />
|
||||||
</p>-->
|
</p>-->
|
||||||
|
|
||||||
<form action="#" class="row" id="base" onsubmit="window.location.href = '/remote/'+this.chan.value;return false;">
|
<form action="#" class="row" id="remoteform" onsubmit="return false;">
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<input
|
<input
|
||||||
class="input-field"
|
class="input-field"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
static/build-js/remotecontroller-min.js
vendored
2
static/build-js/remotecontroller-min.js
vendored
@@ -1 +1 @@
|
|||||||
!function(){function e(){o?(t||(t=$("#code-input").val().toLowerCase()),$("#code-input").val(""),o=!1,$(".rc").css("display","block"),document.getElementById("base").setAttribute("onsubmit","control(); return false;"),$("#remote-text").text("Controlling "+t),document.getElementById("search").setAttribute("length","18"),document.getElementById("search").setAttribute("maxlength","18"),$("#forsearch").html("Type new channel name to change to"),$("#volume-control").slider({min:0,max:100,value:100,range:"min",animate:!0,stop:function(e,o){socket.emit("id",[t,"volume",o.value])}})):(socket.emit("id",[t,"channel",$("#search").val().toLowerCase()]),$("#search").val(""))}var t,o=!0;$(document).ready(function(){setTimeout(function(){$("#search").focus()},500),socket=io.connect("//"+window.location.hostname+":3000"),t=window.location.pathname.split("/")[2],t&&e()}),$("#playbutton").on("click",function(){socket.emit("id",[t,"play","mock"])}),$("#pausebutton").on("click",function(){socket.emit("id",[t,"pause","mock"])}),$("#skipbutton").on("click",function(){socket.emit("id",[t,"skip","mock"])})}();
|
!function(){function e(){o?(t||(t=$("#code-input").val().toLowerCase()),$("#code-input").val(""),o=!1,$(".rc").css("display","block"),$("#remote-text").text("Controlling "+t),document.getElementById("search").setAttribute("length","18"),document.getElementById("search").setAttribute("maxlength","18"),$("#forsearch").html("Type new channel name to change to"),$("#volume-control").slider({min:0,max:100,value:100,range:"min",animate:!0,stop:function(e,o){socket.emit("id",[t,"volume",o.value]),console.log("volume")}})):(socket.emit("id",[t,"channel",$("#search").val().toLowerCase()]),$("#search").val(""))}var t,o=!0;$(document).ready(function(){setTimeout(function(){$("#search").focus()},500),socket=io.connect("//"+window.location.hostname+":3000"),t=window.location.pathname.split("/")[2],t&&e()}),$("#playbutton").on("click",function(){socket.emit("id",[t,"play","mock"])}),$("#pausebutton").on("click",function(){socket.emit("id",[t,"pause","mock"])}),$("#skipbutton").on("click",function(){socket.emit("id",[t,"skip","mock"])}),$("#remoteform").on("submit",function(){o?window.location.href="/remote/"+document.getElementById("remoteform").chan.value:e()})}();
|
||||||
@@ -18,7 +18,6 @@ var Hostcontroller = {
|
|||||||
ytplayer.setVolume(arr[1]);
|
ytplayer.setVolume(arr[1]);
|
||||||
localStorage.setItem("volume", arr[1]);
|
localStorage.setItem("volume", arr[1]);
|
||||||
Playercontrols.choose_button(arr[1], false);
|
Playercontrols.choose_button(arr[1], false);
|
||||||
ytplayer.loadVideoById('mockmaster');
|
|
||||||
}else if(arr[0] == "channel")
|
}else if(arr[0] == "channel")
|
||||||
{
|
{
|
||||||
socket.emit("change_channel");
|
socket.emit("change_channel");
|
||||||
@@ -34,7 +33,7 @@ var Hostcontroller = {
|
|||||||
else if(arr[0] == "play")
|
else if(arr[0] == "play")
|
||||||
ytplayer.playVideo();
|
ytplayer.playVideo();
|
||||||
else if(arr[0] == "skip")
|
else if(arr[0] == "skip")
|
||||||
skip();
|
List.skip();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -27,11 +27,13 @@ $("#skipbutton").on("click", function()
|
|||||||
socket.emit("id", [id, "skip", "mock"]);
|
socket.emit("id", [id, "skip", "mock"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
$("#remoteform").on("submit", function()
|
||||||
document.getElementById("volume-control").addEventListener("click", function()
|
|
||||||
{
|
{
|
||||||
socket.emit("id", [id, "volume", $("#volume-control").val()]);
|
if(start)
|
||||||
});*/
|
window.location.href = '/remote/'+document.getElementById("remoteform").chan.value;
|
||||||
|
else
|
||||||
|
control();
|
||||||
|
});
|
||||||
|
|
||||||
function control()
|
function control()
|
||||||
{
|
{
|
||||||
@@ -43,7 +45,7 @@ function control()
|
|||||||
|
|
||||||
$(".rc").css("display", "block");
|
$(".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)
|
$("#remote-text").text("Controlling "+ id)
|
||||||
document.getElementById("search").setAttribute("length", "18");
|
document.getElementById("search").setAttribute("length", "18");
|
||||||
document.getElementById("search").setAttribute("maxlength", "18");
|
document.getElementById("search").setAttribute("maxlength", "18");
|
||||||
@@ -61,6 +63,7 @@ function control()
|
|||||||
},*/
|
},*/
|
||||||
stop:function(event, ui) {
|
stop:function(event, ui) {
|
||||||
socket.emit("id", [id, "volume", ui.value]);
|
socket.emit("id", [id, "volume", ui.value]);
|
||||||
|
console.log("volume");
|
||||||
//console.log(ui.value);
|
//console.log(ui.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user