GithubHelp home page GithubHelp logo

Comments (7)

muaz-khan avatar muaz-khan commented on June 13, 2024 4

Here is how to get ondataavailable event fired only on a button click:

mediaRecorder.start(999999999999999); // longest possible interval

document.getElementById('stop-recording').onclick = function() {
    mediaRecorder.stop(); // stop on button click
};

E.g. http://stackoverflow.com/a/32264996/552182

BTW, silence detection can be added as an optional feature. E.g.

mediaRecorder.recorderType = StereoAudioRecorder; // force WebAudio for Edge/Firefox/Chrome
mediaRecorder.skipSilentAudioBuffers = true;

// or
mediaRecorder.dontRecordOnSilence = true;

from mediastreamrecorder.

Premier avatar Premier commented on June 13, 2024 2

Any updates about silence detector?

from mediastreamrecorder.

adeel-raza avatar adeel-raza commented on June 13, 2024 2

Any hints how to achieve this?

from mediastreamrecorder.

muaz-khan avatar muaz-khan commented on June 13, 2024 1

Silence detection feature is not added yet. BTW, yep, we can fire ondataavailable on detecting silence.

from mediastreamrecorder.

ItsWendell avatar ItsWendell commented on June 13, 2024 1

How would we go about using ondataavailable to detect silences?

from mediastreamrecorder.

borabilgin avatar borabilgin commented on June 13, 2024

What I meant was to make the blobs available when silence is detected - but thanks for the reply. I'll look into the dontRecordOnSilence option and modify the code accordingly.

from mediastreamrecorder.

fookingthg avatar fookingthg commented on June 13, 2024

you can use the onmute event to detect silence. But this will work only if it is completely silent and no data is available from the recording devices.
stream.getVideoTracks()[0].onmute = function() { //TODO : Do something };

from mediastreamrecorder.

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.