I've copy/pasted the example file into a working server and have confirmed the response headers are received (by the console.log(res.headers) line). However no metadata events are being triggered, even when I'm confident the stream is sending metadata. Below is the exact code I'm running
icy.get(url, function (res) {
// log the HTTP response headers
console.log(res.headers);
// log any "metadata" events that happen
res.on('metadata', function (metadata) {
console.log(metadata);
var parsed = icy.parse(metadata);
console.log(parsed);
io.sockets.emit("metadata", metadata);
});
});
I realized the metadata event was not being fired due to me not pipeing the stream anywhere and therefore once the initial get request was complete, my connection to the stream was closed.
I've copy/pasted the example file into a working server and have confirmed the response headers are received (by the console.log(res.headers) line). However no metadata events are being triggered, even when I'm confident the stream is sending metadata. Below is the exact code I'm running