[webkit-dev] Safari browser on Mac OSX complains "AudioContext.createMediaStreamSource" is undefined !
Sasi San
sasikumar.gandhi at gmail.com
Thu Mar 19 09:35:01 PDT 2015
Hi-
I am trying to get the live audio input from microphone using AudioContext.
Safari browser complains that the "createMediaStreamSource" is undefined.
here is my sample of JavaScript code. It's not able to create Audio source
node. So I am not able to get the audio sample from microphone in the
OnAudioProcess event handler.
var micGain = audioContext.createGain();
if(!audioContext.createScriptProcessor){
micAudioProcessor =
audioContext.createJavaScriptNode(bufferSize, 1, 1);
console.log('createJavaScriptNode Done');
} else {
micAudioProcessor =
audioContext.createScriptProcessor(bufferSize, 1, 1);
console.log('createScriptProcessor Done');
}
// Create an AudioNode from the stream.
if(typeof(audioContext.createMediaStreamSource) === 'function') {
micInput = audioContext.createMediaStreamSource(inAudioStream);
micInput.connect(micGain);
}
else {
console.log('method createMediaStreamSource unavailable');
}
Please let me know why Safari is complaining on this API
"createMediaStreamSource ". Is there any other way I can get the live audio
sample from microphone on Safari browser???
Thanks,
Sasi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20150319/ec02c048/attachment.html>
More information about the webkit-dev
mailing list