Copy link to clipboard
Copied
When I try to place a button on my HTML5 canvas that activates a sound (mp3) it works fine on desktops and android devices but not on my IOS device (Iphone IOS 14.2).
When I use this code in the first frame:
this.aBtn.addEventListener("click",clicked);
function clicked(){
createjs.Sound.play("sound");
}
After creating a button with the instance name aBtn and added a file.mp3 to the library with a linkage name sound I don't hear anything on my IOS device (with Safari en firefox) . It does work great on my desktop and android phone.
I tried many different approaches but without success.
(I' using Adobe Animate 21.0)
Can somebody point me toward a solution? Tnx in adv!
Hi.
Making videos and sound work properly in iOS is always a challenge...
There several limitations and issues you should be aware of:
SoundJS v1.0.0 API Documentation : Sound (createjs.com)
It may be the WebAudio context that needs "to be 'unlocked' by playing at least one sound inside of a user- initiated event" - and that's the reason I added that initial check for Chrome -, or because of audio format, or plugins... It's really hard to tell.
You're gonna have to test it out.
I wish
...Copy link to clipboard
Copied
Hi.
Making videos and sound work properly in iOS is always a challenge...
There several limitations and issues you should be aware of:
SoundJS v1.0.0 API Documentation : Sound (createjs.com)
It may be the WebAudio context that needs "to be 'unlocked' by playing at least one sound inside of a user- initiated event" - and that's the reason I added that initial check for Chrome -, or because of audio format, or plugins... It's really hard to tell.
You're gonna have to test it out.
I wish I could be of more help.
Regards,
JC