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

case 'doneRecording': throws in recorderWorker.js #1

Closed
lafferty opened this issue Mar 16, 2015 · 1 comment
Closed

case 'doneRecording': throws in recorderWorker.js #1

lafferty opened this issue Mar 16, 2015 · 1 comment

Comments

@lafferty
Copy link

Nice piece of work!

I did noticed the case 'doneRecoding' in recorderWorker.js throw when e.data.recordOpus is false. Seems instanceof fail, because importScripts( 'oggopus.js' ) has not run and the type has not loaded.The behaviour is a bit annoying in a Chrome's debugger, because it halts the worker thread. Here's the snippet:

case 'doneRecording':
      if ( this.recorder instanceof OggOpus ) {
        this.recorder.encodeFinalFrame();
      }
      break;

case 'init':
      if ( e.data.recordOpus ) {
        importScripts( 'oggopus.js' );
        this.recorder = new OggOpus( e.data );
      }
      else {
        importScripts( 'wavepcm.js' );
        this.recorder = new WavePCM( e.data );
      }
      break;
@chris-rudmin
Copy link
Owner

Good catch. Fixed in 6f4fed6.

chris-rudmin pushed a commit that referenced this issue Feb 3, 2018
chris-rudmin added a commit that referenced this issue Jul 15, 2020
Load webAssembly synchronously (inlined)
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

2 participants