View Single Post
Old 7th August 2020, 08:54   #9
PimpUigi
Junior Member
 
Join Date: Sep 2005
Location: West Philadelphia
Posts: 27
Send a message via AIM to PimpUigi
OK, I got it. This actually inserts the Audio tag right where the script is in the HTML code, so you don't have to retype it. So it starts the Audio controls and the </audio> is still there at the bottom to end it.

code:
<script type="text/javascript">
var nocache=10000+Math.round(Math.random()*90000);
document.writeln('<audio id="StationName" controls preload="none" src="/stream?type=http&nocache='+ nocache +'" type="audio/mpeg">');
</script>
Your browser does not support the audio element.
</audio>



I recommend getting an HTTPS shoutcast stream if doing this with shoutcast. Since Chrome has issues with shoutcast these days otherwise. I know Shoutcast isn't really built for HTTPS but NexusCast is one such provider of Shoutcast stations that can use an HTTPS server.

Sexy Kick!
PimpUigi is offline   Reply With Quote