TooTallNate / node-icy

Node.js module for parsing and/or injecting ICY metadata
MIT License
291 stars 48 forks source link

Getting Track Metadata ? #27

Closed daslicht closed 8 years ago

daslicht commented 8 years ago

Hi, this returns the current global stream metadata,

 console.error('stat:', res.headers);

how to retrive the song metadata please? the metadata callback seams to get called never

TooTallNate commented 8 years ago

You listen for the "metadata" event (res.on('metadata', function (metadata) { ... })). See the README exmaple: https://github.com/TooTallNate/node-icy#example

daslicht commented 8 years ago

I know, but it doesnt fire even tho i have metadate....

TooTallNate commented 8 years ago

Can you show me the URL of the stream?

TooTallNate commented 8 years ago

And/or possibly some code that you are using?

daslicht commented 8 years ago
           var icy = require('icy');

            var url = 'http://ansolas.de:8000/example1.ogg';

            icy.get(url, function (res) {

                console.error('stat:', res.headers); //shows global metadata

                res.on('metadata', function (metadata) {
                    var parsed = icy.parse(metadata); //never called
                    console.log('parsed:',parsed);
                });
            });
daslicht commented 8 years ago

is parsing an ogg stream is supported ?

rllola commented 7 years ago

Same here.

I am using ogg stream and it doesn't seems to work.