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

Blobs received in onData function are unusable #115

Open
shalabhsingh opened this issue Apr 16, 2021 · 0 comments
Open

Blobs received in onData function are unusable #115

shalabhsingh opened this issue Apr 16, 2021 · 0 comments

Comments

@shalabhsingh
Copy link

So I have been unable to play/use the blobs received in the onData function after several attempts. However, the blob received in the onStop function is perfect to use.

Steps to reproduce

I defined a function saveBlob which downloads the blob file as and when they are generated in the code.

  saveBlob(blob, fileName) {
      var a = document.createElement("a");
      document.body.appendChild(a);
      a.style = "display: none";
      var url = window.URL.createObjectURL(blob);
      a.href = url;
      a.download = fileName;
      a.click();
      window.URL.revokeObjectURL(url);
  }

onData(recordedBlob){
    this.saveBlob(recordedBlob, "streamAudio.webm")
}

onStop(recordedBlob) {
    this.saveBlob(recordedBlob.blob, "finalAudio.webm")
}

FYI, I am using the webm audio format. Also, the first few seconds ae not getting recorded as previously pointed out in #71

I think it is a bug, or is there something that I am doing wrong?

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

1 participant