43081j / id3

A JavaScript ID3 tags parser for Node & browsers.
MIT License
335 stars 63 forks source link

Integration id3js and meteor #32

Open oogre opened 8 years ago

oogre commented 8 years ago

Hello, I'm trying to integrate this lib to a Meteor project. To do this I added meteorhacks package : meteor add meteorhacks:npm Then in the packages.json I wrote : { "id3js": "1.1.3" } And then I used id3js like that :

var id3js = Meteor.npmRequire('id3js');
id3js({ 
    file: url, 
    type: id3js.OPEN_URI 
}, function(err, tags) {
    if(err) console.log(err);
    console.log(tags);
});

And it crash like that :

I20160129-14:45:21.813(1)? Exception while invoking method 'podcastAdd' ReferenceError: XMLHttpRequest is not defined
I20160129-14:45:21.814(1)?     at [object Object].Reader.ajax (/Users/ogre/Work/6102/ogre/from.brussels/.meteor/local/isopacks/npm-container/npm/node_modules/id3js/dist/id3.js:137:17)
I20160129-14:45:21.814(1)?     at [object Object].Reader.open (/Users/ogre/Work/6102/ogre/from.brussels/.meteor/local/isopacks/npm-container/npm/node_modules/id3js/dist/id3.js:50:10)
I20160129-14:45:21.814(1)?     at id3 (/Users/ogre/Work/6102/ogre/from.brussels/.meteor/local/isopacks/npm-container/npm/node_modules/id3js/dist/id3.js:961:10)
I20160129-14:45:21.814(1)?     at [object Object].Meteor.methods.podcastAdd (lib/methods/podcast.js:14:4)
I20160129-14:45:21.814(1)?     at maybeAuditArgumentChecks (livedata_server.js:1698:12)
I20160129-14:45:21.815(1)?     at livedata_server.js:708:19
I20160129-14:45:21.815(1)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160129-14:45:21.815(1)?     at livedata_server.js:706:40
I20160129-14:45:21.815(1)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160129-14:45:21.815(1)?     at livedata_server.js:704

Any idea to solve it properly ?