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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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.