Jump to content

sound control doesn't work on android & ios


Recommended Posts

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 ?

 

Link to post
Share on other sites

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!).

Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...