-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
threejs example not working on iOS? #47
Comments
funny enough, the audioListener.context.state is running, not suspended, it should be fine... |
Ditto - this also happens on BabylonJS. It fails to playback any host audio on iOS nor on Safari on Mac. |
I have the exact same issue isolated to Safari on Mac and iOS devices. I found it was related to Safari's AutoPlay policy settings. You can't ask the user to set In my three.js project, just using simple javascript, I created a a function attached to the click/tap event handler on a button the user clicks/taps before requesting audio from the host. Future requests for the AWS host to speak, were allowed.
My hopes were dashed after testing further. I noticed if the user delays between clicking and requesting more speech from the host, the audio starts to crackle and become distorted, as if Safari has detected you are pulling a fast one on it! I post my partial findings in case this helps find a proper solution. This is a great open source project that is hampered with the Safari autoplay policy limitation I think. I hope the dev team on this can solve it better than I can. |
Hey @lbracegirdle @mikaelwozniak @ranilian @hyandell Did you find a solution for this? we can't get the audio to play on iOS in Chrome or Safari. We see in the Chrome console using chrome://inspect "the audio context is not running". We added a mute / play button to activate the audio context and replay the message, but still silence. Spent loads of time looking for an answer, so any suggestions would be much appreciated. |
Hey @crowers, I did manage to fix the issue by changing the underlying method that audio is loaded which bypasses the iOS restriction. Note this is just my approach and is not an official answer. It may or may not work for you.
|
Just wanted to update this issue: This quoted fix was working for over a year, but no longer works with the latest iOS. If anyone can find another way to auto play on iOS for Babylon.js, that would be extremely useful. I created a start button that plays audio on click, but once it finishes and new audio is called once the first speech is completed, that new audio is mute. |
safari/chrome on iPhone iOS 14.5.
the lips are moving but there is no sound.
(also, note the threejs version has to be specified in the import, for example below:)
Is it related to webAudio context? Any workaround? Thanks in advance.
The text was updated successfully, but these errors were encountered: