Javascript library that reads, parses, and queues real-time metadata from an Icecast stream.
<script src="icecast-metadata-player-1.14.2.min.js"></script>
<script>
const onMetadata = (metadata) => {
document.getElementById("metadata").innerHTML = metadata.StreamTitle;
};
const player =
new IcecastMetadataPlayer(
"https://dsmrad.io/stream/isics-all", // stream endpoint
{ onMetadata } // options (onMetadata callback)
);
</script>
<body>
<button onclick="player.play();"> Play </button>
<button onclick="player.stop();"> Stop </button>
<p> Now Playing: <span id="metadata"></span> </p>
</body>
audio element to play the stream.