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

changed mergeAudioBuffers to a function declaration to preserve the name... #16

Merged
merged 1 commit into from
Feb 11, 2015

Conversation

jimlowrey
Copy link
Contributor

Hi,
In Chrome RecordRTC.min.js I think has an issue with minification obscuring the function expression mergeAudioBuffers in StereoAudioRecorder.js. The minifier removes the mergeAudioBuffers from the function expression. Later when

'this.onmessage = function (e) {mergeAudioBuffers(e.data);}'

is called mergeAudioBuffers is not found I believe. In order to preserve 'mergeAudioBuffers' function name until it is called later it is converted to a function declaration and appealed to as _function.name in processWebWorker.

Here is an example using https://webrtcexperiment-webrtc.netdna-ssl.com/RecordRTC.min.js

http://jsfiddle.net/jimlowrey/m2ev2meh/

and the modification using an inlined version from my local machine.

http://jsfiddle.net/jimlowrey/xpLr508k/

Not sure if I should check in the resulting RecordRTC.js and RecordRTC.min.js.

Please let me know if you think this is the best way to go about this and if you want any more information.

Thanks for the awesome resource!

muaz-khan added a commit that referenced this pull request Feb 11, 2015
muaz-khan added a commit that referenced this pull request Feb 11, 2015
changed mergeAudioBuffers to a function declaration to preserve the name...
@muaz-khan muaz-khan merged commit d762f24 into muaz-khan:master Feb 11, 2015
AndersDJohnson pushed a commit to AndersDJohnson/RecordRTC that referenced this pull request Apr 8, 2019
AndersDJohnson pushed a commit to AndersDJohnson/RecordRTC that referenced this pull request Apr 8, 2019
changed mergeAudioBuffers to a function declaration to preserve the name...
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

Successfully merging this pull request may close these issues.

2 participants