flowerpower

This commit is contained in:
mynah
2018-08-14 02:33:30 -05:00
parent b05388ac29
commit a43ea3e778
9 changed files with 120 additions and 15 deletions

View File

@@ -4,6 +4,7 @@ body{
background-size:cover;
background-image:url("grulla_21.jpg");
background-position: right top;
}
section.header{
@@ -44,12 +45,14 @@ section.vid{
justify-content: center;
-webkit-justify-content: center;
background-color: rgba(0,0,0,0.85);
padding: calc(10% + 30px) 0px;
padding: calc(1% + 5px) 0px;
width:100%;
height:90vh;
max-height:800px;
}
div.flowplayer{
background-image:url("noise.jpg");
}
.flowplayer.is-ready:not(.is-poster){
background-color: rgba(0,0,0,0.4) !important;
}

View File

@@ -9,8 +9,8 @@ window.onload = function () {
live:true ,
title: "Transmisión en directo",
sources: [
{ type: "video/webm", src: "//radio.chaos.foundation/live.webm" },
{ type: "application/dash+xml", src: "//radio.chaos.foundation/dash/cell.mpd" },
{ type: "application/dash+xml", src:"https://radio.chaos.foundation/dash/cell.mpd" },
{ type: "video/webm", src:"https://radio.chaos.foundation/live.webm" },
]
}

65
public/home/home/bcast.js Executable file
View File

@@ -0,0 +1,65 @@
window.onload = function(){
radioUpdate();
function radioUpdate(){
d3.json(radio_server +"/status-json.xsl")
.timeout(10000)
.get(function(e,d){
if(e !=undefined){
console.warn("sin conxion");
offline();}
else{
if(d.icestats.source!=undefined){
if(d.icestats.source.listenurl == webm_listen_url){
console.log("transmitiendo video");
onlinev(d); }
else if (d.icestats.source.listenurl == radio_listen_url){
console.log("transmitiendo radio");
onliner(d); }
else {
console.warn("otro canal");
offline(); }}
else {
console.warn("fuera de línea");
offline();
}
} }); };
function dataUpdate(){
d3.json(radio_server+"/status-json.xsl")
.timeout(10000)
.get(function(e,d){
if(e !=undefined){ console.warn("sin datos radio"); }
else{
if(d.icestats.source!=undefined){
if(d.icestats.source.listenurl == listen_url ){
d3.select("#now").text(d.icestats.source.title);
}}}
d3.select("#ra").transition().on("end",dataUpdate).delay(60000);
});
};
function offline(){
d3.selectAll("article.broadcast").style("display","none")
d3.select("article.broadcast").transition().on("end",radioUpdate).delay(90000);
};
function onlinev(d){
d3.selectAll("article.broadcast")
.style("display","block")
.on("click",function(){window.location="bcast";});
dataUpdate();
}
function onliner(d){
d3.selectAll(".broadcast")
.style("display","block")
.on("click",function(){window.location="radio";});
dataUpdate();
}
}

View File

@@ -33,3 +33,25 @@ p.mod{
padding:5% 5%;
text-align:left;
}
article.broadcast{
position: absolute;
display: none;
margin: 33vh auto;
width: 100%;
color: white;
align-content: center;
text-align: center;
-webkit-align-content: center;
text-align: center;
padding: 2px;
background-color: rgba(0,0,0,0.8);
cursor:pointer;
}
article.broadcast:hover{
background-color: rgba(0,0,0,1);
}
p.broadcast{
font-size: 1.9em;
}