Search Issue Tracker
By Design
Votes
0
Found in
2019.3
2019.3.15f1
2019.4
Issue ID
1259405
Regression
No
[WebGL] Web Speech API calls do not return audio output on the iOS Safari browser
How to reproduce:
1. Set up a server for the WebGL build (Node.js was used in this instance)
2. Open the user-supplied project called "WebGL_Web_Speech_API.zip"
3. Build for WebGL
4. Open the Terminal and type "cd <project directory>" and hit Enter
5. Type "serve" and hit Enter
6. Open Safari in your iOS device and copy the address from the Terminal to the address bar
7. Tap the two Unity buttons once the project loads
Expected result: sound can be heard after tapping the buttons which originates from Web Speech API
Actual result: no sound can be heard
Reproducible with: 2019.3.16f1, 2019.4.9f1
Could not test with: 2020.1.3f1, 2020.2.0a21 due to an "Unexpected token: '<'" error
Reproduces on:
VLNQA00160 iPhone 6S iOS 13.3.1
Notes:
1. If the "Fraudulent Website Warning" option is turned off in the Safari settings, the Web Speech API sounds can be heard.
2. In 2019.3.16f1, 2019.49f1, if the "Read It" button outside of Unity is pressed, then the Unity buttons begin working with Web Speech API.
3. Not reproducible on desktop Safari.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
iOS has the restriction that the speech synthesis API needs to be invoked from a user event, such as click or touchend...but only the first time it's invoked, after which it can be done pragmatically. One option is to add to the webgl template a touchend event handler on the canvas and generate a short speech with a volume of 0 so it can't be heard. After that, calls to the API from Unity buttons (which are not considered user events by the browser) should work.