user1164605
user1164605

Reputation: 123

how can javascript Twilio browser client detect that recording has actually started when the beep is played?

I can successfully record voice within the browser using Twilio.js lib.

I would like to display a count down timer once the recording begins which happens when the "beep" is played.

Is there any way for the client lib to detect the recording start / beep so that I can start count down timer?

Upvotes: 1

Views: 181

Answers (1)

Devin Rader
Devin Rader

Reputation: 10366

Twilio evangelist here.

There is no way for the client to tell you that a "beep" has occurred. What you could do is at the beginning of the call, prompt the user to press a button on the web page to start recording. That button press can do two things:

  1. send a DTMF tone to Twilio which you can listen for using the <Gather> verb. Once the gather completes you can tell Twilio to start recording.
  2. starts a timer on the client.

The timing between the client and exactly when the client starts won't be 100% in sync, but it should be pretty close.

Hope that helps.

Upvotes: 1

Related Questions