After my test, due to the addition of this line of code, the Google browser audio playback in ios (12.1) failed.(经过我测试,由于添加了这行代码,使得在ios(12.1) 的谷歌浏览器音频播放失败.)
file path is: src/audio/Audio.js
source.detune.value = this.detune;
Unfortunately, I can't verify the issue since I have no iOS device. Maybe someone else with an iPhone can test with the Web Audio examples:
@Mugen87 I've tested the examples on iOS both Safari and Chrome. The Timing example doesn't work, the others do. I ran into this thread because of an error I'm experiencing on _Safari macOS (12.0.2 on Mojave)_ as well. It is the same Timing example that doesn't work.
In both iOS and macOS it returns the same error: TypeError: undefined is not an object (evaluating 'source.detune.value = this.detune')
I can reproduce on macOS. Unfortunately, there is more stuff not working in Safari. The browser does not correctly evaluate the directional cone in webaudio_orientation. Besides certain sounds in webaudio_sandbox are not played because Safari does not support Ogg Vorbis.
Safari does not support AudioBufferSourceNode.detune so far. We could fix this by check if source.detune is undefined.
@1097364388 Would you please update your PR and implement the mentioned check in Audio.play() and Audio.setDetune()? The latter method should ideally print a warning if it is used when detune is undefined.
/cc @ngokevin
I've added a bug report at the Webkit issue tracker. Let's see what happens^^
@1097364388 Never mind. @ngokevin was faster^^
Most helpful comment
@Mugen87 I've tested the examples on iOS both Safari and Chrome. The Timing example doesn't work, the others do. I ran into this thread because of an error I'm experiencing on _Safari macOS (12.0.2 on Mojave)_ as well. It is the same Timing example that doesn't work.
In both iOS and macOS it returns the same error:
TypeError: undefined is not an object (evaluating 'source.detune.value = this.detune')