gulp listener on remotecontroller too, and updated remotecontroller.js

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-24 20:07:29 +02:00
parent 28ee75c750
commit 0dabed6f07
8 changed files with 29 additions and 16 deletions

View File

@@ -0,0 +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"])})}();