mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Fixed hostcontroller and removed an errormessage that appears on channels with one song only
This commit is contained in:
@@ -3,7 +3,7 @@ var Hostcontroller = {
|
||||
enabled: true,
|
||||
|
||||
host_listener: function() {
|
||||
|
||||
|
||||
var old_id;
|
||||
|
||||
socket.on("id", function(id)
|
||||
@@ -51,7 +51,7 @@ var Hostcontroller = {
|
||||
}else if(arr[0] == "pause")
|
||||
Youtube.ytplayer.pauseVideo()
|
||||
else if(arr[0] == "play")
|
||||
YouTube.ytplayer.playVideo();
|
||||
Youtube.ytplayer.playVideo();
|
||||
else if(arr[0] == "skip")
|
||||
List.skip();
|
||||
}
|
||||
|
||||
@@ -106,12 +106,14 @@ var List = {
|
||||
full_playlist[0].added = time;
|
||||
full_playlist[length].now_playing = false;
|
||||
|
||||
full_playlist.push(full_playlist.shift());
|
||||
$("#wrapper").children()[0].remove();
|
||||
try{
|
||||
full_playlist.push(full_playlist.shift());
|
||||
$("#wrapper").children()[0].remove();
|
||||
|
||||
List.insertAtIndex(full_playlist[length-1], false);
|
||||
document.getElementById('wrapper').scrollTop += 1;
|
||||
document.getElementById('wrapper').scrollTop += -1;
|
||||
List.insertAtIndex(full_playlist[length-1], false);
|
||||
document.getElementById('wrapper').scrollTop += 1;
|
||||
document.getElementById('wrapper').scrollTop += -1;
|
||||
}catch(e){}
|
||||
},
|
||||
|
||||
vote: function(id, vote){
|
||||
|
||||
@@ -406,10 +406,12 @@ function onepage_load(){
|
||||
|
||||
Youtube.stopInterval = true;
|
||||
Admin.display_logged_out();
|
||||
Admin.beginning = true;
|
||||
chan = "";
|
||||
Admin.beginning = true;
|
||||
chan = "";
|
||||
began = false;
|
||||
$("#embed-button").css("display", "none");
|
||||
|
||||
|
||||
socket.removeAllListeners();
|
||||
|
||||
$.ajax({
|
||||
|
||||
@@ -13,11 +13,12 @@ $(document).ready(function (){
|
||||
'sync disconnect on unload':true,
|
||||
'secure': true
|
||||
};
|
||||
socket = io.connect('https://zoff.no:8880', connection_options);
|
||||
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
||||
else add = "localhost";
|
||||
socket = io.connect(add + ':8880', connection_options);
|
||||
id = window.location.pathname.split("/")[1];
|
||||
if(id)
|
||||
{
|
||||
console.log("remote exists");
|
||||
id = id.toLowerCase();
|
||||
Remotecontroller.control();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user