basspistol.com/radio.html
Set Hallstrom 5113069605 stash
2020-09-08 18:07:38 +02:00

165 lines
4.1 KiB
HTML

---
title: Basspistol Libre Radio
subtitle: Radio
description: >-
Basspistol Radio Station! 777% without commercials! RobotDJ-sets and live
interventions! This is the sound of freedom.
tags:
- radio
- basspistol
- live
- music
- broadcast
- stream
video_path: /assets/vid/radio.mp4
image: /assets/vid/radio.jpg
layout: default
---
{% include relBase.html %}
<script src="{{ relBase }}/assets/js/jquery-3.5.1.min.js"></script>
<script type="text/javascript">
function getData() {
$.getJSON('https://radio.basspistol.com/status-json.xsl', function(json) {
output = "<p>" + "<span style='font-size:14px;'>Now Playing:</span> " + "<br/>";
output += "<strong>" + json.icestats.source[1].title + "</strong> by <strong>" + json.icestats.source[1].artist + "</strong></p>";
output += "<p style='font-size:14px;'>" + json.icestats.source[0].listeners + " peers are listening in MP3 <br />";
output += json.icestats.source[1].listeners + " peers are listening in OGG</p>";
document.getElementById("radioPlaceholder").innerHTML=output;
});
}
setInterval(getData, 7000);
$(function() {
getData();
});
</script>
<!-- Banner -->
<div id="trackArt">
<section>
<div class="coverartwrapper">
<div class="coverartwrapped" id="coverart" style="background-image: url({{ page.image }});"></div>
</div>
<div class="playbutton hideWhenNoJS">
<a id="mu_pause" class="button">Play!</a>
</div>
</p>
</section>
</div>
<!-- Content -->
<div id="trackInfo">
<section>
<h1>{{ page.title }}</h1>
<p>{{ page.description }}</p>
<div id="radioPlaceholder"></div>
<p><strong><span id="tracktime"></span></strong><br /></p>
{% include author.html %}
<p class="noJSalbum"><a class="button" target="_blank" rel="noopener" href="https://radio.basspistol.com/radio.mp3"><span class="fas fa-play"></span> Play!</a></p>
</section>
</section>
{% include footer.html %}
<!-- End Post Navigation -->
</div>
<!-- Audio player-->
<div id="fixedPlayer" class="showplayer hideplayer">
<div id="audiowrap">
<div id="audio0">
<audio controls autoplay preload="metadata" data-matomo-title="Basspistol Radio">
<source src="https://radio.basspistol.com/radio.mp3" type="audio/mpeg" ontimeupdate='updateTrackTime(this);' />
<source src="https://radio.basspistol.com/radio.ogg" type="audio/ogg" ontimeupdate='updateTrackTime(this);' />
<h1>Your browser isn't ready for so much hotness. Use the download-link instead.</h1>.
</audio>
</div>
</div>
<div id="nowPlay">
</div>
</div>
<script type="text/javascript">
function loadUrl(newLocation) {
window.location = newLocation;
return false;
}
var mu = document.getElementsByTagName("audio")[0];
var pauseButton = document.getElementById("mu_pause");
var spincover = document.getElementById("coverart");
var fixedplayer = document.getElementById("fixedPlayer");
mu.addEventListener('ended', function () {
// only functional if "loop" is removed
mu.pause();
mu.currentTime = 0;
loadUrl("{{ relBase }}{{ page.next.url }}"); return false;
});
mu.onplaying = function() {
pauseButton.innerHTML = "Pause";
fixedplayer.classList.remove("hideplayer");
};
pauseButton.addEventListener("click", function () {
if (mu.paused) {
mu.play();
}
else {
mu.pause();
}
});
mu.addEventListener('playing', function () {
spincover.classList.add("spinnit");
spincover.classList.remove("paused");
});
mu.addEventListener('pause', function () {
spincover.classList.add("paused");
pauseButton.innerHTML = "Resume";
});
mu.addEventListener('timeupdate', function () {
var timestamp = Math.floor(mu.currentTime);
var hours = Math.floor(timestamp / 60 / 60);
var minutes = Math.floor(timestamp / 60) - (hours * 60);
var seconds = timestamp % 60;
var formatted = hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0') + ':' + seconds.toString().padStart(2, '0');
var thecurrentSpan = document.getElementById("tracktime");
thecurrentSpan.innerHTML = formatted;
});
</script>