0

I am having issues integrating recorder.js into my meteor project. https://github.com/mattdiamond/Recorderjs

In the main script there is a reference to another file called recorderWorker.js

Every time I try to call the record(); function it wraps this code with:

 (function(){
   if (Meteor.isClient) { 

 })();

and then in console I get an error:

Uncaught ReferenceError: Meteor is not defined

I have tried moving the file to a meteor server directory but it still wraps it as above

Background: I am new to javascript and Meteor what I am trying to do?: I am trying to create a web audio api player that plays an mp3 on one track and records voice on another track.

I understand that I should create a package for this third-party javascript but I would like to see it work before tackling how to create a meteor package.

the
  • 21,007
  • 11
  • 68
  • 101
user3795286
  • 136
  • 1
  • 14
  • Obviously in self-invoking function there won't be Meteor variable. What is wrapping your code in that kind of function? It isn't clear – sdooo Sep 24 '15 at 16:29
  • Check here if anything suits you: https://atmospherejs.com/?q=record – sdooo Sep 24 '15 at 16:30
  • See: http://stackoverflow.com/a/32174123/4665459 – Mark Leiber Sep 24 '15 at 19:13
  • @MarkLeiber. That did it. I wish you had posted this as an answer so I could mark it as the correct answer. Thank you! – user3795286 Sep 24 '15 at 21:56
  • @Sindis thank you for your assistance. I had previously looked for a package in atmospherejs.com but record !== to record ie. There are not many packages that record audio from browser and the ones that are currently in atmosphere rely heavily on dependencies which I am trying to avoid. – user3795286 Sep 24 '15 at 21:59

0 Answers0