Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

258
Visualizações
record rtc multistream recorder loose audio on resetstream

hi i am working with a webrtc project . i am using Recordrtc for recording both localstream and remotestream

recorder = RecordRTC([localstream,remotestream], {
    type: 'video',
    mimeType: 'video/webm',
    numberOfAudioChannels: 2,
    elementClass: 'multi-streams-mixer',
    audioBitsPerSecond: 6000, // min: 100bps max: 25000
    videoBitsPerSecond: 150000, // min: -5000bps max: 130000
  });

on flip my camera i will update the recorder with new stream

recorder.getInternalRecorder().resetVideoStreams([localStream, remoteStream]);

on reseting new stream i loose audio of remote stream . can any one help me solve the audio issue

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I fixed this issue by updating resetVideoStreams function in recordRTC with latest version

replace resetVideoStreams in recordRTC with

    function resetVideoStreams(streams) {
        videos = [];
        streams = streams || arrayOfMediaStreams;

        // via: @adrian-ber
        streams.forEach(stream => {
            if (stream.getTracks().filter(function (t) {
                return t.kind === 'video';
            }).length) {
                var video = getVideo(stream);
                video.stream = stream;
                videos.push(video);
            }

            if (stream.getTracks().filter(function (t) {
                return t.kind === 'audio';
            }).length && self.audioContext) {
                var audioSource = self.audioContext.createMediaStreamSource(stream);
                audioSource.connect(self.audioDestination);
                self.audioSources.push(audioSource);
            }
        });

    }
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda