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

111
Views
Audio not capturing while recording screen

I am trying to record screen, audio and save it in local. I could record the video and save the file but I couldn't hear the audio in the saved file. Please help me out.

Code

async function recordScreen() {
  const video = document.createElement("video");
  const stream = await navigator.mediaDevices.getDisplayMedia({
    video: { mediaSource: "screen" },
    audio: true
  });

  navigator.mediaDevices.getUserMedia({audio:true}).then((mic) => {
    stream.addTrack(mic.getTracks()[0]);
});

  const recorder = new MediaRecorder(stream);

  const chunks = [];
  recorder.ondataavailable = e => chunks.push(e.data);
  recorder.start();
  recorder.onstop = e => {
    const completeBlob = new Blob(chunks, { type: 'video/webm;codecs=vp9' });
    video.src = URL.createObjectURL(completeBlob);
    let file = new File([completeBlob], `${user}-${new Date()}-record.webm`);
    saveAs(file);
  };
}
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!