basspistol.com/radio.html

165 lines
4.1 KiB
HTML
Raw Normal View History

2019-04-01 23:16:35 +02:00
---
title: Basspistol Libre Radio
subtitle: Radio
2019-04-14 11:09:20 +02:00
description: >-
Basspistol Radio Station! 777% without commercials! RobotDJ-sets and live
interventions! This is the sound of freedom.
2020-07-11 09:07:24 +02:00
tags:
- radio
- basspistol
- live
- music
- broadcast
- stream
2019-04-02 00:28:32 +02:00
video_path: /assets/vid/radio.mp4
2020-07-09 10:15:00 +02:00
image: /assets/vid/radio.jpg
2020-07-10 11:46:33 +02:00
layout: default
2019-04-01 23:16:35 +02:00
---
2019-04-14 11:09:20 +02:00
2020-09-08 18:07:38 +02:00
{% 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);
2020-07-10 11:46:33 +02:00
2020-09-08 18:07:38 +02:00
$(function() {
getData();
});
</script>
<!-- Banner -->
2020-07-10 11:46:33 +02:00
2020-09-08 18:07:38 +02:00
<div id="trackArt">
<section>
<div class="coverartwrapper">
<div class="coverartwrapped" id="coverart" style="background-image: url({{ page.image }});"></div>
</div>
<div class="playbutton hideWhenNoJS">
2020-09-11 10:44:23 +02:00
<a id="mu_pause" class="button">🎶 Play!</a>
2020-09-08 18:07:38 +02:00
</div>
2020-07-10 11:46:33 +02:00
2020-07-09 10:15:00 +02:00
2020-09-08 18:07:38 +02:00
</p>
2020-07-10 11:46:33 +02:00
2020-09-08 18:07:38 +02:00
</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>
2020-07-10 11:46:33 +02:00
2020-09-08 18:07:38 +02:00
{% include author.html %}
2020-07-10 11:46:33 +02:00
2020-09-08 18:07:38 +02:00
<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>
2020-07-10 11:46:33 +02:00
</section>
2020-09-08 18:07:38 +02:00
</section>
{% include footer.html %}
<!-- End Post Navigation -->
</div>
<!-- Audio player-->
<div id="fixedPlayer" class="showplayer hideplayer">
<div id="audiowrap">
<div id="audio0">
2020-09-10 11:44:08 +02:00
<audio controls autoplay preload="none" data-matomo-title="Basspistol Radio">
2020-09-08 18:07:38 +02:00
<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>
2020-07-10 11:46:33 +02:00
</div>
2020-09-08 18:07:38 +02:00
2020-07-10 11:46:33 +02:00
</div>
2020-09-08 18:07:38 +02:00
<div id="nowPlay">
2020-07-10 11:46:33 +02:00
2020-09-08 18:07:38 +02:00
</div>
</div>
2020-07-10 11:46:33 +02:00
<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");
2020-09-08 18:07:38 +02:00
var fixedplayer = document.getElementById("fixedPlayer");
2020-07-10 11:46:33 +02:00
mu.addEventListener('ended', function () {
2019-02-28 17:06:17 +01:00
// only functional if "loop" is removed
mu.pause();
2020-07-10 11:46:33 +02:00
mu.currentTime = 0;
2020-09-08 18:07:38 +02:00
loadUrl("{{ relBase }}{{ page.next.url }}"); return false;
2020-07-10 11:46:33 +02:00
});
mu.onplaying = function() {
pauseButton.innerHTML = "Pause";
2020-09-08 18:07:38 +02:00
fixedplayer.classList.remove("hideplayer");
2020-07-10 11:46:33 +02:00
};
2019-02-28 17:06:17 +01:00
2020-07-10 11:46:33 +02:00
pauseButton.addEventListener("click", function () {
2019-02-28 17:06:17 +01:00
if (mu.paused) {
2020-07-10 11:46:33 +02:00
mu.play();
2019-02-28 17:06:17 +01:00
}
2020-07-10 11:46:33 +02:00
else {
mu.pause();
2020-09-08 18:07:38 +02:00
2020-07-10 11:46:33 +02:00
}
});
2020-09-08 18:07:38 +02:00
mu.addEventListener('playing', function () {
spincover.classList.add("spinnit");
spincover.classList.remove("paused");
});
mu.addEventListener('pause', function () {
spincover.classList.add("paused");
pauseButton.innerHTML = "Resume";
});
2020-07-10 11:46:33 +02:00
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;
});
2019-02-28 17:06:17 +01:00
2020-09-08 18:07:38 +02:00
2020-07-10 11:46:33 +02:00
</script>