我使用JavaFX applet,使用javax.sound.sampled.AudioSystem
API记录来自MIC的声音。 Applet是使用dtjava.js
从浏览器启动的。在所有平台上它工作正常,除了Mac上的Safari,它加载,但它无法访问内置麦克风。
这里有一些诊断代码输出:
public static String mixerInfo() {
final Mixer.Info[] mixerInfo = AudioSystem.getMixerInfo();
return "Mixer data: " + Arrays.toString(mixerInfo);
}
Chrome的输出:
Mixer data: [Default Audio Device, version Unknown Version, Built-in Microphone, version Unknown Version, Built-in Output, version Unknown Version, Port Built-in Microphone, version Unknown Version, Port Built-in Output, version Unknown Version]
Safari的输出:
Mixer data: [Default Audio Device, version Unknown Version, Built-in Output, version Unknown Version, Port Built-in Output, version Unknown Version]
在两台计算机上测试:MacBook Pro (Retina, 15-inch, Late 2013), OS X Yosemite v. 10.10.2 (14C109), Safari - Version 8.0.3 (10600.3.18)
和iMac 27" late 2013 OS X v. 10.9.5, Safari - Version 7.1.3 (9537.85.12.18)
我需要做些什么才能在Safari中运行? 谢谢!