Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

sometimes Only 44 bytes audio recording #6

Open
Gopirengaraj08 opened this issue Feb 19, 2019 · 2 comments
Open

sometimes Only 44 bytes audio recording #6

Gopirengaraj08 opened this issue Feb 19, 2019 · 2 comments

Comments

@Gopirengaraj08
Copy link

Gopirengaraj08 commented Feb 19, 2019

While recording audio in .wav format, sometimes only 44 bytes are recording. I don't know the reason.
So kindly help me. I'm using recorder-js in angular6.

@huy9x30
Copy link

huy9x30 commented Aug 7, 2019

I got same problem while using in Chrome v76 and RiotJS. Only got 44 bytes of blob.

@cain06
Copy link

cain06 commented Sep 13, 2019

Anyone who is monitoring this - this is directly related to the other issue posted about audio context starting. The solution to this is pretty easy, in the example there is a line like this:

const audioContext = new (window.AudioContext || window.webkitAudioContext)();

Really what you want to do is create the audioContext in your click handler, not as a const. E.g.


var audioContext = null;
$(".record").click(function() {
  if (audioContext == null) {
      audioContext =  new (window.AudioContext || window.webkitAudioContext)();
  }
  // rest of example will work now
});

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

No branches or pull requests

3 participants