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

160
Views
How to include mic audio in RecordRTC Screen Recording?

I am doing screen recording using RecordRTC.

How do I include my mic audio when recording?

My code below using Angular:

  async startRecording() {
    let mediaConstraints = {
      video: {
      }, 
      audio: true
    };
    await this.mediaDevices.getDisplayMedia(mediaConstraints).then(this.successCallback.bind(this), this.errorCallback.bind(this));
  }

  successCallback(stream: MediaStream) {
    this.recording = true;
    var options = {
      mimeType: 'video/webm', // or video/webm\;codecs=h264 or video/webm\;codecs=vp9
      audioBitsPerSecond: 128000,
      videoBitsPerSecond: 128000,
      bitsPerSecond: 128000 // if this line is provided, skip above two
    };
    this.stream = stream;
    this.recordRTC = RecordRTC(stream, options);
    this.recordRTC.startRecording();
    let video: HTMLVideoElement = this.rtcvideo.nativeElement;
    video.src = window.URL.createObjectURL(stream);
    this.toggleControls();

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

0

You need to attach an audio track to the stream

successCallback(stream){
    //your other code here
    //...

    navigator.mediaDevices.getUserMedia({audio:true}).then(function(mic) {
        stream.addTrack(mic.getTracks()[0]);
    });
    //
    this.recordRTC = RecordRTC(stream, options);
    this.recordRTC.startRecording();
}

This should be helpful. https://www.webrtc-experiment.com/RecordRTC/

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!