我在控制台(chrome)中尝试了webkitAudioContext,并定义了它(使用本机代码实现)。
webkitAudioContext
function AudioContext() { [native code] }在safari (5.1.6)中,它返回'message:"Can't find variable: AudioContext"‘。
AudioContext
Error
line: 2
message: "Can't find variable: AudioContext"
sourceId: 4569334656
__proto__: Error
webkitAudioContext
Error
line: 2
message: "Can't find variable: webkitAudioContext"
sourceId: 4647161912
__proto__: Error我可以在safari中使用webkitAudioContext吗?
谢谢!
编辑:
var context = new webkitAudioContext();
Error
line: 2
message: "Can't find variable: webkitAudioContext"
sourceId: 4603762264
__proto__: Error发布于 2013-04-29 22:05:08
不,你不能:http://caniuse.com/audio-api
它只在Safari 6.0+中受支持。
发布于 2013-04-29 19:41:52
是的,你可以用。尝试使用new关键字调用它,并在它后面加上括号。
var context = new webkitAudioContext();https://stackoverflow.com/questions/16272768
复制相似问题