-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
"Uncaught TypeError: e is not a function" when using RecordRTC in Angular-CLI app #429
Comments
Would be great to get some feedback about this. I am also experiencing the same problem. |
jeffgammon
added a commit
to jeffgammon/RecordRTC
that referenced
this issue
Aug 28, 2018
muaz-khan
added a commit
that referenced
this issue
Aug 29, 2018
#429 fix minify/uglify problem where function and parameter names col…
@muaz-khan can you release a new version? |
Thank you, @muaz-khan, for adding this commit. We are getting more users encountering this issue and we would appreciate a new release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When stopping a recording, the generated blob JavaScript has an onmessage method in it whose parameter name is "e". This is the bit of generated JavaScript:
this.onmessage = function (e) {whammyInWebWorker(e.data);}
However, when including RecordRTC in an Angular2 application, the Angular CLI re-minifies/uglifies RecordRTC.min.js, resulting in the whammyInWebWorker function being renamed to "e" in my particular bundle. This is the bit of generated JavaScript now:
this.onmessage = function(e) { e(e.data); }
Because the uglified name is "e", and the parameter name is also "e", the function errors with
Uncaught TypeError: e is not a function
at onmessage (blob:https://....)
Is it possible that you rename the "e" parameter name in onmessage to a name that is much less likely to collide with a minified/uglified name? I believe you generate this in the "processInWebWorker" method around line 2759.
The text was updated successfully, but these errors were encountered: