mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added overlay for when its an empty playlist
This commit is contained in:
@@ -84,6 +84,11 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 m9 video-container hide-on-small-only">
|
<div class="col s12 m9 video-container hide-on-small-only">
|
||||||
<div id="player" class="ytplayer"></div>
|
<div id="player" class="ytplayer"></div>
|
||||||
|
<div id="player_overlay" class="hide valign-wrapper">
|
||||||
|
<div id="player_overlay_text" class="valign center-align">
|
||||||
|
Waiting for Video
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div id="controls">
|
<div id="controls">
|
||||||
<div id="playpause">
|
<div id="playpause">
|
||||||
<i id="play" class="mdi-av-play-arrow hide"></i>
|
<i id="play" class="mdi-av-play-arrow hide"></i>
|
||||||
|
|||||||
@@ -103,10 +103,11 @@ io.on('connection', function(socket){
|
|||||||
db.createCollection(coll, function(err, docs){
|
db.createCollection(coll, function(err, docs){
|
||||||
db.collection(coll).insert({"addsongs":false, "adminpass":"", "allvideos":false, "frontpage":true, "longsongs":false, "removeplay": false, "shuffle": true, "skip": false, "skips": [], "startTime":get_time(), "views": [], "vote": false}, function(err, docs)
|
db.collection(coll).insert({"addsongs":false, "adminpass":"", "allvideos":false, "frontpage":true, "longsongs":false, "removeplay": false, "shuffle": true, "skip": false, "skips": [], "startTime":get_time(), "views": [], "vote": false}, function(err, docs)
|
||||||
{
|
{
|
||||||
db.collection(coll).find().sort({votes:-1}, function(err, docs) {
|
sort_list(coll, socket, true, false);
|
||||||
|
/*db.collection(coll).find().sort({votes:-1}, function(err, docs) {
|
||||||
socket.emit(coll, docs);
|
socket.emit(coll, docs);
|
||||||
//send_play(coll, socket);
|
//send_play(coll, socket);
|
||||||
});
|
});*/
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,6 +188,18 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
|
|
||||||
/*------------------- Channel page ---------------------------------------------------------------------------- */
|
/*------------------- Channel page ---------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#player_overlay{
|
||||||
|
background-color:black;
|
||||||
|
position: absolute;
|
||||||
|
top:0px;
|
||||||
|
width:97.7%;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#player_overlay_text{
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
#searchform{
|
#searchform{
|
||||||
width: 50%;
|
width: 50%;
|
||||||
margin-left: 25%;
|
margin-left: 25%;
|
||||||
@@ -565,7 +577,7 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
}
|
}
|
||||||
.control-list{
|
.control-list{
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
.control-list li a{ min-width: 0px; width: 37px; padding: 0 0 0 5px;}
|
.control-list li a{ min-width: 0px; width: 37px; padding: 0 0 0 5px;}
|
||||||
|
|
||||||
@@ -630,4 +642,4 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
height: 90%;
|
height: 90%;
|
||||||
height: calc(100% - 64px);
|
height: calc(100% - 64px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,11 +49,14 @@ socket.on(chan.toLowerCase()+",np", function(obj)
|
|||||||
console.log(obj);
|
console.log(obj);
|
||||||
if(obj[0].length == 0){
|
if(obj[0].length == 0){
|
||||||
console.log("Empty list");
|
console.log("Empty list");
|
||||||
document.getElementById('song-title').innerHTML = "Empty channel. Add some songs!"
|
document.getElementById('song-title').innerHTML = "Empty channel. Add some songs!";
|
||||||
|
$("#player_overlay").height($("#player").height());
|
||||||
|
$("#player_overlay").toggleClass("hide");
|
||||||
importOldList(chan.toLowerCase());
|
importOldList(chan.toLowerCase());
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log("gotten new song");
|
console.log("gotten new song");
|
||||||
|
$("#player_overlay").addClass("hide");
|
||||||
video_id = obj[0][0]["id"];
|
video_id = obj[0][0]["id"];
|
||||||
conf = obj[1][0];
|
conf = obj[1][0];
|
||||||
time = obj[2];
|
time = obj[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user