mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
More fixes for current playing, and enabling remotecontroller if specified
This commit is contained in:
@@ -5,13 +5,17 @@ var Hostcontroller = {
|
||||
old_id: null,
|
||||
|
||||
host_listener: function(id) {
|
||||
|
||||
if(Hostcontroller.old_id === null) Hostcontroller.old_id = id;
|
||||
else {
|
||||
socket.removeAllListeners(id);
|
||||
began = false;
|
||||
Hostcontroller.old_id = id;
|
||||
}
|
||||
if(embed) {
|
||||
if(window.parentWindow && window.parentOrigin) {
|
||||
window.parentWindow.postMessage({type: "controller", id: id}, window.parentOrigin);
|
||||
}
|
||||
}
|
||||
var codeURL = "https://remote."+window.location.hostname+"/"+id;
|
||||
$("#code-text").text(id);
|
||||
$("#code-qr").attr("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+codeURL);
|
||||
@@ -54,6 +58,7 @@ var Hostcontroller = {
|
||||
|
||||
change_enabled:function(val){
|
||||
enabled = val;
|
||||
document.getElementsByName("remote_switch")[0].checked = enabled;
|
||||
console.log(enabled);
|
||||
$(".remote_switch_class").prop("checked", enabled);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user