Skip to content

Record live audio stream in html5, save file on your server or download it directly from browser

Notifications You must be signed in to change notification settings

seiven/jsHtml5AudioRecorder

 
 

Repository files navigation

Js Html5 Audio Recorder

JsHtml5AudioRecorder is a native html5 object that helps you record live audio stream from your browser. it provides echo cancellation and clear record. It works perfectly on Google Chrome, Firefox and Opera.

  1. How to install

bower install js-html5-audio-recorder
  1. How to use it?

//Instantiate the object
var jsAudioRecorder                 = new jsHtml5AudioRecorder();

//Set Parameters
jsAudioRecorder.Recorder            = Recorder;         //External library that effectively record audio stream

jsAudioRecorder.mediaPath           = '/medias/Temp/';  //Path where to store audio files
jsAudioRecorder.audioExtension      = 'wav';            //Only wav format is supported
jsAudioRecorder.audioTagId          = 'myAudio';
jsAudioRecorder.showStreamOnFinish  = false;            //Show audio player on finish?

jsAudioRecorder.phpFile             = '/form/audioProcess.php'; //Php file that will proceed to audio file 

//Initialize it
jsAudioRecorder.init();

//Start recording
jsAudioRecorder.startRecording();


function startCapture() {
    jsPhotoBooth.startCapture();
    stopRecording();
}

/**
 * You can use "save", "saveAndDownload" or "saveAndStream", "downloadAndStream" parameters
 */
function stopRecording() {
    //For demo
    jsPhotoBooth.stopCapture('downloadAndStream');

    //Use this in production
    //jsPhotoBooth.stopCapture('saveAndStream');
}
  1. Live Demonstration

http://edouardkombo.github.io/jsHtml5AudioRecorder/demo/

Contributing

If you do contribute, please make sure it conforms to the PSR coding standard. The easiest way to contribute is to work on a checkout of the repository, or your own fork, rather than an installed version.

Want to learn more? Visit my blog http://creativcoders.wordpress.com

Issues

Bug reports and feature requests can be submitted on the Github issues tracker.

For further informations, contact me directly at edouard.kombo@gmail.com.

About

Record live audio stream in html5, save file on your server or download it directly from browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ApacheConf 43.2%
  • JavaScript 40.9%
  • PHP 14.1%
  • HTML 1.8%