I'm developing a WebKit-based mac application: a native Cocoa app that consists mostly of a WebView. The app needs to play audio and do simple DSP. I'd like to use the Web Audio API for this.
When I open a Web Inspector on my WebView, I'm told that window
has a property calledwebkitAudioContext
, but this property is set to undefined
.
> window
[...]
webkitAudioContext: undefined
[...]
This suggests that the Web Audio API isn't supported in WebViews by default. Is there a way to enable it?
Are WebKit feature flags involved somehow?
I researched this issue on the Apple Developer forums. One poster there had the exact same question, but he didn't get a response. If no one on the Apple Forums knows how to enable Web Audio, I'm going to conclude that it can't be done, at least for the moment. What a shame.
I think the answer to my question is "no".
If this changes in the future, or if you have any evidence to the contrary, please correct me.