comicsite/_includes/mplayer.html
etherware-novice 056d775e28
adds hyperlink
2024-08-10 22:15:37 -05:00

32 lines
789 B
HTML

<div id="player">
<a id="player-text" href="https://radio.erb.pw"></a>
<a id="player-stop" href="javascript:void(0)">stop</a>
<a id="player-play" href="javascript:void(0)">play</a>
</div>
<audio id="interadio" src="https://radio.erb.pw/listen/subspace/radio.mp3"></audio>
<script src='/assets/js/icystream.js'></script>
<script>
var player = document.getElementById('interadio');
var playertxt = document.getElementById('player-text');
console.log(player);
console.log(playertxt);
function playEr(){
player.play();
playertxt.style.display = 'inline';
};
function stopEr(){
player.pause();
playertxt.style.display = 'none';
};
stopEr();
document.getElementById('player-stop').onclick = stopEr;
document.getElementById('player-play').onclick = playEr;
</script>