Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
How can user's audio output be accessed in javascript

I am trying to get the user's audio output that is heard in the user's speaker and not from the user's microphone. I currently get's audio input from the microphone with this code

  startRecording.onclick = function() {

        navigator.getUserMedia({
            audio: true
        }, function(stream) {
                recordAudio = RecordRTC(stream, {
                type: 'audio',
                mimeType: 'audio/webm',
                sampleRate: 44100,
                desiredSampRate: 16000,
                
                recorderType: StereoAudioRecorder,
                numberOfAudioChannels: 1,

                timeSlice: 4000,

                
                ondataavailable: function(blob) {
                    console.log('ondataavailable');
                   
                    var stream = ss.createStream();
                    
                    ss(socket).emit('stream-media', stream, {
                        name: 'stream.wav', 
                        size: blob.size
                    });
                    
                    ss.createBlobReadStream(blob).pipe(stream);
                }
            });

            recordAudio.startRecording();

        }, function(error) {
            console.error(JSON.stringify(error));
        });
    };

the code above works fine to get the audio input from the microphone but how can I get user's audio output separate from the microphone input?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!