Sunday, November 8, 2026
HomeiOS DevelopmentTone.js not taking part in audio on iOS

Tone.js not taking part in audio on iOS

[ad_1]

I’ve an utility that makes use of Tone.js, and I exploit the GrainPlayer object particularly.
It really works completely wonderful on totally different browsers throughout totally different OS and gadgets…
aside from iOS. I personally haven’t got an iOS machine, however shoppers are exhibiting me that iOS is not taking part in the audio. It is also not restricted to safari; different browsers on their machine additionally will not play the audio.

I do know it is a Tone.js-specific subject right here, as a result of I additionally use Howler.js for a number of of the sounds that do not require the Tone GrainPlayer class, and people work. It is also not an AudioContext subject on the whole, as a result of I’ve the next code:

Tone.setContext(Howler.ctx);

Which ensures the AudioContext for Tone is routed by the AudioContext for Howler.

Is there a technique to get it to play? I have to preserve utilizing GrainPlayer due to its distinctive properties and features, so switching out is not going to work for me as an answer sadly.
I’ve no approach of diagnosing it from a developer standpoint as a result of once more I haven’t got an iOS machine, and even then they do not have a technique to pull up a developer console…
But it surely appears to not break code or something, simply looks like it ‘ignores’ the sound taking part in, and strikes on.

The sounds in query are created as such:

standardChord[0] = new Tone.GrainPlayer('/A.flac').join(Howler.masterGain);

After which once they have to be performed:

standardChord[0].begin();

Which like I stated works wonderful on different gadgets.

Lastly, unsure if this issues or not, nevertheless it’s a Meteor utility I am working, bundled right into a Node.js for deployment.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments