↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

HTML5: record audio to file

The answer references an existing web demo that records audio directly in the browser and then lets the user export and download the recorded sound. By inspecting that demo’s source, one can see a JavaScript Recorder object that offers methods to export the recording as a WAV file and to initiate a download of the result.

Reading notes
#

  • A browser-based audio recording demo is available at http://webaudiodemos.appspot.com/AudioRecorder/index.html.
  • The demo lets users record audio in the browser, then export and download what was recorded.
  • Viewing the page source reveals JavaScript code with a Recorder object.
  • The Recorder object includes an exportWAV method for creating a WAV file from the recording.
  • The Recorder object also provides a forceDownload method to start downloading the exported audio file.