Coder Social home page Coder Social logo

Comments (4)

gezquinndesign avatar gezquinndesign commented on July 23, 2024

Created a PR - #54 to preview audio, the previewStream currently only gets the video tracks, so added a previewAudioStream that does the same thing as previewStream but just for audio.

from react-media-recorder.

DeltaCircuit avatar DeltaCircuit commented on July 23, 2024

@HBM08 that is by design. It's mentioned in the docs too

Please note that this is a muted stream. This is by design to get rid of internal microphone feedback on machines like laptop.

I just wanted to avoid an unexpected feedback from the internal mic. It would create such a mess 😁

@gezquinndesign thanks for the PR, it does just what it says. Awesome! but having two APIs for the stream is will lead to confusion I guess previewStream and previewAudioStream.

What do you guys think?

from react-media-recorder.

gezquinndesign avatar gezquinndesign commented on July 23, 2024

If we only want one way to access the stream in its entirety, then we will have to remove the limitation that is brought about by only returning only the VideoTracks, perhaps we can make it a function with defaults?

getPreviewStream({audio: boolean = false, video: boolean = true})

and return the appropriate altered MediaStream based on the options provided.

Or just return the MediaStream without altering it and warn users to ensure that the audio needs to be muted if using it for a video preview.

As it stands, I don't think it causes too much confusion having 2 separate APIs (previewStream and previewAudioStream) for the stream. It's just an opt-in addition and will ensure there are no breaking changes if people choose to upgrade.

Maybe there's a case for renaming previewStream to previewVideoStream to avoid confusion.

from react-media-recorder.

gezquinndesign avatar gezquinndesign commented on July 23, 2024

@0x006F I can alter the PR depending on what you think is best.

from react-media-recorder.

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.