Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more information on how to install #45

Open
Juanvulcano opened this issue Feb 21, 2020 · 2 comments
Open

Add more information on how to install #45

Juanvulcano opened this issue Feb 21, 2020 · 2 comments

Comments

@Juanvulcano
Copy link

Hi I'm sorry,

I don't have a lot of JS experience and don't find the documentation very clear on how to install.
I followed the instructions, installed with npm. I have a simple html site.

When trying to load the polyfill-js I get:
Reference error require is not defined

Is just doing:
npm install --save audio-recorder-polyfill enough?

Also where would this code go on a simple html site?

entry: { app: './src/app.js', polyfill: './src/polyfill.js' }

This is the code I'm using for app.js
navigator.mediaDevices.getUserMedia({ audio: true }).then(stream => { recorder = new MediaRecorder(stream) recorder.addEventListener('dataavailable', e => { audio.src = URL.createObjectURL(e.data) }) recorder.start() })

I installed Parcel but I'm even more confused now as well.

@jrm2k6
Copy link

jrm2k6 commented Feb 24, 2020

The entry line is assuming that you are using webpack.
You need to reference the bundle javascript in your html file. It will contain all the javascript code that you can run.
To do so, you can use webpack/parcel or any other bundler.

@ai
Copy link
Owner

ai commented Feb 25, 2020

@jrm2k6 thanks. I will be glad for PR to fix a doc and make it more clear,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants