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

@@ -3,20 +3,27 @@
secrets => ['b8a9e54090ccb580b6203e53a9f9199af38ce538'], secrets => ['b8a9e54090ccb580b6203e53a9f9199af38ce538'],
path => 'public', path => 'public',
#Radio =====================================================
radio_server_name=>"localhost:3000",
radio_server =>"https://radio.vuelodegrulla.com",
radio_channel => "/p",
radio_listen_url =>"http://gruya:8000/p",
#Chat ======================================================= #Chat =======================================================
chat_addr => "https://chat.vuelodegrulla.com", chat_addr => "https://chat.vuelodegrulla.com",
chat_srv => "chat.vuelodegrulla.com", chat_srv => "chat.vuelodegrulla.com",
chat_channel => 'Grullas@radio.chat.vuelodegrulla.com', chat_channel => 'Grullas@radio.chat.vuelodegrulla.com',
#Radio =====================================================
radio_server_name=>"http://chaos.foundation:8000/p",
radio_server =>"https://radio.chaos.foundation",
radio_channel => "/p",
radio_listen_url =>"https://chaos.foundation/p",
#RTPM ======================================================= #RTPM =======================================================
rtmp_server =>"rtmp://vuelodegrulla.com/steam", rtmp_server =>"rtmp://chaos.foundation/steam",
rtmp_channel =>"cell", rtmp_channel =>"cell",
#Dash/Webm =======================================================
dash_listen_url =>"https://radio.chaos.foundation/dash/live.mpd",
webm_listen_url =>"https://radio.chaos.foundation/live.webm",
webm_server_name=>"http://chaos.foundation:8000/live.webm",
webm_channel => "/live.webm",
} }

View File

@@ -4,6 +4,7 @@ body{
background-size:cover; background-size:cover;
background-image:url("grulla_21.jpg"); background-image:url("grulla_21.jpg");
background-position: right top; background-position: right top;
} }
section.header{ section.header{
@@ -44,12 +45,14 @@ section.vid{
justify-content: center; justify-content: center;
-webkit-justify-content: center; -webkit-justify-content: center;
background-color: rgba(0,0,0,0.85); background-color: rgba(0,0,0,0.85);
padding: calc(10% + 30px) 0px; padding: calc(1% + 5px) 0px;
width:100%; width:100%;
height:90vh; height:90vh;
max-height:800px;
} }
div.flowplayer{ 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 , live:true ,
title: "Transmisión en directo", title: "Transmisión en directo",
sources: [ sources: [
{ type: "video/webm", src: "//radio.chaos.foundation/live.webm" }, { type: "application/dash+xml", src:"https://radio.chaos.foundation/dash/cell.mpd" },
{ type: "application/dash+xml", src: "//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%; padding:5% 5%;
text-align:left; 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;
}

View File

@@ -1 +0,0 @@
16080

View File

@@ -1,5 +1,4 @@
<link rel="stylesheet" href="//releases.flowplayer.org/7.2.1/skin/skin.css"> <link rel="stylesheet" href="//releases.flowplayer.org/7.2.1/skin/skin.css">
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="//releases.flowplayer.org/7.2.1/flowplayer.min.js"></script> <script src="//releases.flowplayer.org/7.2.1/flowplayer.min.js"></script>
<script src="//releases.flowplayer.org/dashjs/flowplayer.dashjs.min.js"></script> <script src="//releases.flowplayer.org/dashjs/flowplayer.dashjs.min.js"></script>
@@ -7,5 +6,4 @@
<div class="flowplayer fp-outlined" > <div class="flowplayer fp-outlined" >
</div> </div>
</section> </section>
<script src="jsFlowpl.js"></script>

View File

@@ -3,6 +3,11 @@
<article class="mod"> <article class="mod">
<p class="mod"> <%= $mod %> </p> <p class="mod"> <%= $mod %> </p>
</article> </article>
<article class="broadcast">
<p class="broadcast">Estamos practicando ahora</p>
<p class="broadcast">¡Acompáñanos!</p>
</article>
</section> </section>
<section id="sadown" class="adown"> <article class="adown"></article></section> <section id="sadown" class="adown"> <article class="adown"></article></section>
@@ -50,3 +55,9 @@
<p>Maestro</p><p class="bold">Pang Ming</p> <p>Maestro</p><p class="bold">Pang Ming</p>
</article></a> </article></a>
</article></section> </article></section>
<script>
const webm_listen_url="<%= $config->{webm_server_name} %>";
const radio_listen_url="<%= $config->{radio_server_name} %>";
const radio_server="<%= $config->{radio_server} %>";
</script>

View File

@@ -39,6 +39,6 @@
<script> <script>
const nick="<%= $nick %>"; const nick="<%= $nick %>";
const radio_server="<%= $config->{radio_server} %>"; const radio_server="<%= $config->{radio_server} %>";
const listen_url="<%= $config->{radio_listen_url} %>"; const listen_url="<%= $config->{radio_server_name} %>";
const channel="<%= $config->{radio_channel} %>"; const channel="<%= $config->{radio_channel} %>";
</script> </script>