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

172
Views
Usage of mozCaptureStream stop audio output of video element

Call mozCaptureStream API on video tag causes to stop audio output

OS: Windows 10 (x64) Browser: Mozilla Firefox 100.0.2 (64-bit)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This is BUG 1178751, Firefox does destroy the AudioSink from the original media element so that it's instead transferred into the newly produced MediaStream.

They're still working on it (after 7 years), and hopefully they'll fix it one day and stop prefixing captureStream().

Until this day comes, you can use an AudioContext to play the MediaStream's audio:

const vid = document.querySelector("video");
vid.onplay = (evt) => {
  const stream = vid.captureStream ? vid.captureStream() : vid.mozCaptureStreamUntilEnded();
  console.log(stream);
  if (!vid.captureStream) {
    const ctx = new AudioContext();
    const dest = ctx.createMediaStreamSource(stream);
    dest.connect(ctx.destination);
  }
};
<video src="https://upload.wikimedia.org/wikipedia/commons/2/22/Volcano_Lava_Sample.webm" crossorigin controls autoplay></video>

about 4 years ago · Juan Pablo Isaza Report
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!