2

I am trying to play my recorded calls that I got back from twilio. So far I have a list of all my recorded calls on my site and when I click them it sends me to twilio to listen to them. I then make a ajax request to get back the information from twilio and when I get the information its in byte format. I am not sure how to play that on the browser or how to convert it into a .wav format to listen to. Thanks in advance.

Alex Baban
  • 11,312
  • 4
  • 30
  • 44

1 Answers1

1

If you'd like to play the recordings in WAV format you can request against the 'recordings api' with a link like this

https://api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Recordings/RExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.wav?Download=false

where RExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is the RECORDING SID

Change the .wav to .mp3 and you'll play in MP3 format.

Also, observe the Download=false query string parameter.

Alex Baban
  • 11,312
  • 4
  • 30
  • 44
  • That works when I just want to go to twilio's site to listen to that recording but how would I set that up to where I have a play button on my site and when you click the play button it starts playing the recording without having to redirect me to twilio's site? – Tomas Leffew Aug 05 '16 at 19:11
  • You have the link to the audio resource, you can use it on your page with HTML – Alex Baban Aug 05 '16 at 19:30