Live Streaming Metadata

Radio Mast provides live metadata updates for streams on the Radio Mast Streaming Network, which can be integrated into your website or custom player widget to display live track metadata to your listeners.

The live metadata is available via HTML5 Server-Sent Events, which can be read in JavaScript using an EventSource object.

The following example JavaScript code shows how to receive Now Playing metadata and prints it to the console:

document.addEventListener("DOMContentLoaded", function() {

    var stream_url = ""; //Insert your stream URL here.

    try {
        var url = stream_url + "/metadata";
        var eventSource = new EventSource(url);

        eventSource.onmessage = function(event) {
            var metadata = JSON.parse(;
            var artistTitle = metadata['metadata'];

            //Print the new metadata to the console.
    } catch (error) {
        console.log("EventSource initialization failed");