Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

152
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda