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

103
Vistas
Is this possible to record the audio tracks only if video is also enabled with MediaRecorder?

I am working on a scenario where I will ask for the camera and mic permissions before joining the session. so I applied the following constraints in navigator.mediaDevices.getUserMedia

const constraints = {
    audio: true,
    video: {
        width: 1280, height: 720
    }
};

Everything works fine till here. But now I want to record the audio tracks only by using MediaRecorder. Other users can see the other peer's video but in the current session, I just want to record the audio content only for all users.

I tried setting up the MimeType but it still records the video content as well. I think MimeType is just for setting up the mime type for each track.

Do I need to do something on the server side where the blob data is uploaded?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can create a new MediaStream object on which you'll add only the audio tracks from your current MediaStream:

const recording_stream = new MediaStream();
for (const track of gum_stream.getAudioTracks()) {
  recording_stream.addTrack(track);
}
const recorder = new MediaRecorder(recording_stream);
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