【发布时间】:2019-03-23 23:03:29
【问题描述】:
我正在使用音频 API 在网页中即时播放 iOS 6 中的声音。我已经使用 Ajax 调用完成了它,就像建议的文档一样,效果很好。但是,我读到您可以在没有 Ajax 调用的情况下使用 createMediaElementSource() https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/PlayingandSynthesizingSounds/PlayingandSynthesizingSounds.html
但是,似乎以这种方式从音频节点加载,您不能使用 noteon(0) 方法 - 所以实际上无法播放声音!
有没有人解决这个问题?我想创建一些降级为使用音频元素而不是依赖 Ajax 调用的可重用函数?
【问题讨论】:
标签: javascript html web-audio-api