Recorderjs icon indicating copy to clipboard operation
Recorderjs copied to clipboard

Uncaught TypeError: Cannot read property 'clear' of undefined

Open JimCraane opened this issue 10 years ago • 6 comments

I downloaded the whole recorderjs project including the example. I opened the example example_simple_exportwav.html in Chrome v39.0.2171.71. After clicking on 'record' & 'stop' nothing happend.

Looking in the debugger the following error is given: Uncaught TypeError: Cannot read property 'clear' of undefined

This happens in the stopRecording(button) function line 64 at recorder.clear();

I did not change any code. Did I miss some configuration? New Chrome version cause this problem?

JimCraane avatar Dec 01 '14 09:12 JimCraane

So I think the issue is that getUserMedia doesn't work right if your open a html file in the browser as opposed to accessing it on a server. Try to run a local server and access the example_simple_exportwav.html on it.

notthetup avatar Dec 02 '14 00:12 notthetup

Thanks, it works for me now! I didn't see that coming back in the read me file.

JimCraane avatar Dec 02 '14 08:12 JimCraane

Good point. You can update the README and raise a PR. :)

notthetup avatar Dec 02 '14 09:12 notthetup

This issue also arises because of previous error in the page: Uncaught TypeError: undefined is not a function in recorder.js on line 106.

The line in question is Object.assign(this.config, cfg);, and this issue is caused due to lack of support for ES6 Object.assign()

You can add this functionality by using a shim. https://github.com/paulmillr/es6-shim https://github.com/ljharb/object.assign

fabianTMC avatar Dec 24 '15 14:12 fabianTMC

I have the same error while i'm running through localhost

venkatMSS avatar Jan 08 '18 16:01 venkatMSS

So I think the issue is that getUserMedia doesn't work right if your open a html file in the browser as opposed to accessing it on a server. Try to run a local server and access the example_simple_exportwav.html on it.

Is this recoredmp3 will not work in hosting server?

NutanSiva avatar Apr 13 '19 07:04 NutanSiva