Auto call recording: Issue with merging remote and local streams in conference call (JSIP WebRTC) #932
Unanswered
bhumeshdeekonda
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
I'm working on a feature to automatically record conference calls using JSIP with WebRTC, and I’m facing a challenge with receiving and merging remote and local media streams into a single MediaStream for recording purposes.
Problem:
• During a conference call, I'm unable to combine multiple remote streams and the local stream into a single media stream.
• The MediaStream passed to the MediaRecorder sometimes records only local or remote streams, not both.
• I attempted to use new MediaStream([...remoteStream.getTracks(), ...localStream.getTracks()]), but behavior is inconsistent — sometimes remote audio is missing, or the MediaRecorder throws an error.
//-------Simplified code-----------------------------------------------------------------------
const localStream = await navigator.mediaDevices.getUserMedia({ audio: true });
const remoteStreams = []; // Populated from peer connections
peerConnection.ontrack = (event) => {
const remoteStream = event.streams[0];
remoteStreams.push(remoteStream);
};
//------------------------------------------------------------------------------------------------
Any help would be greatly appreciated. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions