circuit/circuit-sdk

Start recording from backend application

Salzy opened this issue · 2 comments

Salzy commented

Hey,

I'm currently trying to start a recording for an ongoing conference call from within a Node.js application on behalf of a bot. I understand that for backend, WebRTC is not supported. However the Circuit API Node.js SDK page explicitly says "does support WebRTC related APIs in which the app does no act as WebRTC endpoint (..., recording)".

I basically tried the following code, ending in a "No active call found" error:

async function main() {
const user = await client.logon();
const call = await client.getStartedCalls();
const callID = call[0].callId;
await client.startRecording(callID, {audio: true, video: false});
}

So my question: Is there a valid way to start a recording for an ongoing call without answering the call and/or without being participant of the conversation?

Thanks in advance!

Hi @Salzy, no there is no way to record a call that you are not a participant in, not even if you are a member of the conversation.

Node JS SDK does not support WebRTC related APIs because Node does not support the WebRTC API itself. A workaround would be to use electron or headless chrome (puppeteer) in your node app which will allow WebRTC APIs. There are a few examples on https://github.com/circuit with each option. But still, your bot needs to be a member of the conversation, and also participating in the call.

Salzy commented

Yeah I already use headless Chrome for a live transcription application which works acceptable.
So if there is simply no way to do this from node.js, this issue can be closed thank you!