Git Product home page Git Product logo

Comments (6)

kkkrist avatar kkkrist commented on May 25, 2024 1

@AsyncSan You could just take the MicrophoneRecorder lib from react-mic and use it in your own custom UI component. This is how mine looks:

https://gist.github.com/kkkrist/6f985ee0f3e6d7c206fd399786262643

(Most of it is about uploading and safely overwriting previous recordings – e.g. attaching only the latest recording to the parent document when it's actually saved – but you get the idea)

@hackingbeauty Thanks! Will take another look at Visualizer when I have more time.

from react-mic.

kalyanpkumar avatar kalyanpkumar commented on May 25, 2024

Any suggestion on this please...

from react-mic.

kkkrist avatar kkkrist commented on May 25, 2024

<ReactMic> has a clear method that's called after the recording has been stopped. It contains a little bug: It tries to extract width and height from state instead of props:

  clear() {
    const { canvasCtx, width, height } = this.state;
    canvasCtx.clearRect(0, 0, width, height);
  }

A fix would be

  clear() {
    const { width, height } = this.props;
    this.state.canvasCtx.clearRect(0, 0, width, height);
  }

But it will stay clear for a few ms only as as the Visualizer will keep drawing (I guess). So it needs a bit more work.

from react-mic.

hackingbeauty avatar hackingbeauty commented on May 25, 2024

@kkkrist, I implemented your bug fix. What else needs to change in the Visualizer?

from react-mic.

AsyncSan avatar AsyncSan commented on May 25, 2024

Hey @hackingbeauty, I got rid of the Wave with visualSetting="false".
But the Canvas is still an element in the HTML.

Is there a way to remove the canvas completely?

Thanks a lot for the good work

from react-mic.

hackingbeauty avatar hackingbeauty commented on May 25, 2024

This issue has been fixed with version 12.4.0 of React-Mic. Thank you!

from react-mic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.