stopviolence Posted April 21, 2016 Share Posted April 21, 2016 Hi, I'm testing the sound.play() method on android & io. - When sound.play() is called on a "onclick" event, it works on android & ios, - When sound.play() is called on a "onload" or "requestanimationframe" events, it doesn't work on android & ios. What's the way to allow full script sound control on androids & ios ? Quote Link to comment Share on other sites More sharing options...
themoonrat Posted April 22, 2016 Share Posted April 22, 2016 The initial sound being played must occur through a user interaction. After that, the web browsers internal sound player becomes 'unlocked' and can then play sounds on any occasion. Therefore you'll find a lot of games have a splash 'Touch to play' screen that a player must pass through to get to the game; and on this touch event the game plays a sound (could be a silent one!). Quote Link to comment Share on other sites More sharing options...
stopviolence Posted April 22, 2016 Author Share Posted April 22, 2016 Thank you, i'm gonna try this approach Quote Link to comment Share on other sites More sharing options...
stopviolence Posted April 22, 2016 Author Share Posted April 22, 2016 ok i've tried... so: - it works only for the sound i played on touch splash screen event - that sond plays only 2/3 times and then become silent Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.