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
- PlayerPrefs get corrupted when a minimized fullscreen Player is closed through the Taskbar
- "To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations." warning is printed when JobTempMemoryLeakValidation switch is enabled
- Main Thread stalling when loading Audio Source asset asynchronously while preloading another Audio Source asset
- Material artifacts occur in the Material Preview window when baked lighting is applied to scenes
- “ArgumentOutOfRangeException” after saving, reseting and re-add Default Tile Palette Tools to the list in Preferences window
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.