mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed remote issue
This commit is contained in:
@@ -3,10 +3,6 @@ var Channel = {
|
|||||||
if (window.location.hash == "#small" || inIframe()) {
|
if (window.location.hash == "#small" || inIframe()) {
|
||||||
small_player = true;
|
small_player = true;
|
||||||
document.querySelector("footer").style.display = "none";
|
document.querySelector("footer").style.display = "none";
|
||||||
//addJoinBox();
|
|
||||||
//hideAllExtra();
|
|
||||||
//document.querySelectorAll(".tab.col.s3")[1].remove();
|
|
||||||
//document.querySelectorAll(".tab.col.s3")[1].remove();
|
|
||||||
}
|
}
|
||||||
if (client) {
|
if (client) {
|
||||||
Helper.addClass(".tabs", "hide");
|
Helper.addClass(".tabs", "hide");
|
||||||
@@ -25,12 +21,7 @@ var Channel = {
|
|||||||
Helper.addClass(".control-list", "client-control-list");
|
Helper.addClass(".control-list", "client-control-list");
|
||||||
} else {
|
} else {
|
||||||
if (!api_key.hasOwnProperty("soundcloud")) soundcloud_enabled = false;
|
if (!api_key.hasOwnProperty("soundcloud")) soundcloud_enabled = false;
|
||||||
else {
|
|
||||||
/*SC.initialize({
|
|
||||||
client_id: api_key.soundcloud
|
|
||||||
}, function() {
|
|
||||||
});*/
|
|
||||||
}
|
|
||||||
if (cast_ready_connect || chromecastAvailable || chromecastReady) {
|
if (cast_ready_connect || chromecastAvailable || chromecastReady) {
|
||||||
Helper.addClass(".volume-container", "volume-container-cast");
|
Helper.addClass(".volume-container", "volume-container-cast");
|
||||||
}
|
}
|
||||||
@@ -295,10 +286,13 @@ var Channel = {
|
|||||||
|
|
||||||
if (!client) {
|
if (!client) {
|
||||||
if (!Helper.mobilecheck()) {
|
if (!Helper.mobilecheck()) {
|
||||||
|
var port = window.location.port;
|
||||||
|
if (port != "") port = ":" + port;
|
||||||
var shareCodeUrl =
|
var shareCodeUrl =
|
||||||
window.location.protocol +
|
window.location.protocol +
|
||||||
"//client." +
|
"//client." +
|
||||||
window.location.hostname +
|
window.location.hostname +
|
||||||
|
port +
|
||||||
"/r/" +
|
"/r/" +
|
||||||
btoa(encodeURIComponent(chan.toLowerCase()));
|
btoa(encodeURIComponent(chan.toLowerCase()));
|
||||||
document
|
document
|
||||||
@@ -312,18 +306,11 @@ var Channel = {
|
|||||||
"#channel-name-join",
|
"#channel-name-join",
|
||||||
"client." +
|
"client." +
|
||||||
window.location.hostname +
|
window.location.hostname +
|
||||||
|
port +
|
||||||
"/" +
|
"/" +
|
||||||
encodeURIComponent(chan.toLowerCase())
|
encodeURIComponent(chan.toLowerCase())
|
||||||
);
|
);
|
||||||
} /*else if(small_player) {
|
}
|
||||||
document.querySelector("#channel-share-modal .modal-content").innerHTML = "<p>To listen to this channel with more features, go to</p><p>https://zoff.me/" + encodeURIComponent(chan.toLowerCase()) + "</p><img src='/assets/images/favicon.png' height='100' width='100' alt='circle-logo-zoff'>";
|
|
||||||
//M.Modal.getInstance(document.getElementById("channel-share-modal")).open();
|
|
||||||
if(!Helper.mobilecheck()) {
|
|
||||||
setTimeout(function() {
|
|
||||||
M.Modal.getInstance(document.getElementById("channel-share-modal")).close();
|
|
||||||
}, 10000);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
} else {
|
} else {
|
||||||
Helper.removeElement(".video-container");
|
Helper.removeElement(".video-container");
|
||||||
Helper.removeElement(".offline-panel");
|
Helper.removeElement(".offline-panel");
|
||||||
@@ -435,24 +422,6 @@ var Channel = {
|
|||||||
position: "top",
|
position: "top",
|
||||||
html: "Cast Zoff to TV"
|
html: "Cast Zoff to TV"
|
||||||
});
|
});
|
||||||
|
|
||||||
/*$("#color_embed").spectrum({
|
|
||||||
color: "#808080",
|
|
||||||
change: function(c) {
|
|
||||||
color = c.toHexString().substring(1); // #ff0000
|
|
||||||
document.getElementById("embed-area").value = embed_code(embed_autoplay, embed_width, embed_height, color);
|
|
||||||
},
|
|
||||||
appendTo: "#embed",
|
|
||||||
containerClassName: 'polyfill-color z-depth-4',
|
|
||||||
show: function(color) {
|
|
||||||
},
|
|
||||||
});*/
|
|
||||||
|
|
||||||
/*Helper.addClass(".sp-choose", "hide");
|
|
||||||
Helper.addClass(".sp-cancel", "btn-flat waves-effect waves-red");
|
|
||||||
Helper.removeClass(".sp-cancel", "sp-cancel");
|
|
||||||
document.getElementsByClassName("sp-button-container")[0].insertAdjacentHTML("beforeend", "<a href='#' class='btn-flat waves-effect waves-green sp-choose-link'>CHOOSE</a>");
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addListener("click", ".sp-choose-link", function(e) {
|
addListener("click", ".sp-choose-link", function(e) {
|
||||||
@@ -708,10 +677,6 @@ var Channel = {
|
|||||||
channel: add + chan.toLowerCase()
|
channel: add + chan.toLowerCase()
|
||||||
});
|
});
|
||||||
} else if (url_split[3] === "") {
|
} else if (url_split[3] === "") {
|
||||||
/*if(client) {
|
|
||||||
var host = window.location.hostname.split(".");
|
|
||||||
window.location.hostname = host[host.length -1];
|
|
||||||
}*/
|
|
||||||
Admin.display_logged_out();
|
Admin.display_logged_out();
|
||||||
if (hostMode) {
|
if (hostMode) {
|
||||||
Helper.removeClass("#main-row", "fullscreened");
|
Helper.removeClass("#main-row", "fullscreened");
|
||||||
|
|||||||
@@ -13,11 +13,7 @@ var Hostcontroller = {
|
|||||||
Hostcontroller.old_id = id;
|
Hostcontroller.old_id = id;
|
||||||
}
|
}
|
||||||
var codeURL =
|
var codeURL =
|
||||||
window.location.protocol +
|
window.location.protocol + "//remote." + window.location.host + "/" + id;
|
||||||
"//remote." +
|
|
||||||
window.location.hostname +
|
|
||||||
"/" +
|
|
||||||
id;
|
|
||||||
if (embed) {
|
if (embed) {
|
||||||
if (window.parentWindow && window.parentOrigin) {
|
if (window.parentWindow && window.parentOrigin) {
|
||||||
window.parentWindow.postMessage(
|
window.parentWindow.postMessage(
|
||||||
|
|||||||
@@ -32,11 +32,8 @@ window.addEventListener(
|
|||||||
M.Modal.init(document.getElementById("about"));
|
M.Modal.init(document.getElementById("about"));
|
||||||
M.Modal.init(document.getElementById("contact"));
|
M.Modal.init(document.getElementById("contact"));
|
||||||
M.Modal.init(document.getElementById("help"));
|
M.Modal.init(document.getElementById("help"));
|
||||||
|
|
||||||
if (window.location.hostname == "remote.zoff.me") add = "https://zoff.me";
|
|
||||||
else add = "localhost";
|
|
||||||
socket = io.connect(
|
socket = io.connect(
|
||||||
add,
|
window.location.protocol + "//" + window.location.host,
|
||||||
connection_options
|
connection_options
|
||||||
);
|
);
|
||||||
socket.on("update_required", function() {
|
socket.on("update_required", function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user