[webkit-dev] Safari browser on Mac OSX complains "AudioContext.createMediaStreamSource" is undefined !

Sasi San sasikumar.gandhi at gmail.com
Thu Mar 19 11:47:36 PDT 2015


Thanks Chris. Is there any other way I can turn that flag?  or Do you any
idea whether it will be supported  in the near furture?

Sasi

On Thu, Mar 19, 2015 at 11:12 AM, Chris Dumez <cdumez at apple.com> wrote:

> Jer or Eric would know more about this but
> AudioContext.createMediaStreamSource() is behind a MEDIA_STREAM
> compile-time flag. It appears the mac port does not turn this flag on so
> Safari does not currently support the Media Stream API.
>
> Kr,
> --
>  Chris Dumez - Apple Inc. - Cupertino, CA
>
>
>
>
> On Mar 19, 2015, at 9:35 AM, Sasi San <sasikumar.gandhi at gmail.com> wrote:
>
> 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 at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20150319/4cbc55cd/attachment.html>


More information about the webkit-dev mailing list