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
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to