Skip to content

Instantly share code, notes, and snippets.

@heath
Created January 26, 2013 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heath/011a88f34454f866fcda to your computer and use it in GitHub Desktop.
Save heath/011a88f34454f866fcda to your computer and use it in GitHub Desktop.
navigator.webkitGetUserMedia({audio:true}, function(stream){
window.audio = document.querySelector('audio');
window.stream = stream;
window.context = new webkitAudioContext();
window.audio.src = window.URL.createObjectURL(stream);
// window.audio.onloadedmetadata = function(e) {
// console.log('onloadedmetadata called');
// window.e = e;
// debugger;
// };
// window.microphone = window.context.createMediaElementSource(window.audio);
// window.audio.src = window.webkitURL.createObjectURL(stream);
// window.stream.filter = window.context.createBiquadFilter();
// window.analyser = window.context.createAnalyser();
// window.microphone.connect(window.analyser);
// window.analyser.connect(window.context.destination);
// doStuff.call(this, window.context.destination);
});
function dostuff(file) {
console.log('fillllleee ', file);
window.a = $.ajax({
type : 'post',
url : 'http://aSite.org:8080',
data : file,
error : function(err){console.log(err)},
complete : function(data) {console.log(data)}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment