Issue is Call Recording and Call Voice using Java Script

Issue in Call Recording and also Generate Ecco Voice Sound and Android User Cant hearing and also simultaneous Web User generate Ecco Sound . I am want only Voice Call


$(".call_attend").click(function() {

const acceptParams = {
callOption: {
remoteMediaView: document.getElementById(‘remote_audio_element_id’),
localMediaView: document.getElementById(‘local_audio_element_id’),
audioEnabled: true,
videoEnabled: false
}
};
console.log(“Call Accepted Here By Astrologer”);
call.accept(acceptParams);

});

call.onEstablished = (call) => {
console.log(“Calling onEstablished”);
console.log(call);
console.log(SendBirdCall.setLoggerLevel(SendBirdCall.LoggerLevel.INFO));
console.log(SendBirdCall.setLoggerLevel(SendBirdCall.LoggerLevel.WARNING));
console.log(SendBirdCall.setLoggerLevel(SendBirdCall.LoggerLevel.ERROR));
console.log(SendBirdCall.setLoggerLevel(SendBirdCall.LoggerLevel.NONE));
document.getElementById(“my_audio”).pause();

};

call.onConnected = (call) => {

console.log(“Calling onConnected”);
console.log(call);
console.log(SendBirdCall.setLoggerLevel(SendBirdCall.LoggerLevel.INFO));
console.log(SendBirdCall.setLoggerLevel(SendBirdCall.LoggerLevel.WARNING));
console.log(SendBirdCall.setLoggerLevel(SendBirdCall.LoggerLevel.ERROR));
console.log(SendBirdCall.setLoggerLevel(SendBirdCall.LoggerLevel.NONE));

console.log(“Recording started”);
call.setRemoteMediaView(document.getElementById(‘remote_audio_element_id’));
call.setLocalMediaView(document.getElementById(‘local_audio_element_id’));

let FILE_NAME=“Shubham.mp4”;

let options = new SendBirdCall.DirectCallRecordOption({
recordingType: SendBirdCall.RecordingType.LOCAL_REMOTE_AUDIOS,
callId: sessionStorage.getItem(“call_id”),
fileName: FILE_NAME
})

console.log(options);
const recordingId = call.startRecording(options);
console.log(recordingId);
sessionStorage.setItem(“RecId”,recordingId);
if(recordingId){
console.log(“Recording start succeed.”);
console.log("NEW " +recordingId);
sessionStorage.setItem(“RecordingId”,recordingId);
// Recording start succeed.
} else {
console.log(“Recording start failed.”);
// Recording start failed.
}

To solve the echo issue, you need to prevent the local audio from playing back in the element (echoing) by including the attribute muted . Example: <video id="viewer_local" autoPlay muted></video> Make sure you only do this on the local element, because if you do it on the remote one also, you will not be able to hear the person you are calling.

To debug the Android user not being able to hear, please first try calling the Android user in the dashboard phonebooth. If it works there, then there is some implementation issue that needs to be solved.

1 Like

i want only voice call not a video call so it is use video tag element in audio voice call
<video id="viewer_local" autoPlay muted></video>
**Or I will use this <audio id="local_audio_element_id" autoPlay muted></audio>**