Search Issue Tracker
Fixed in 2021.1.X
Votes
5
Found in
2018.4
2020.1.4f1
2021.1
Issue ID
1283199
Regression
No
[WebGL][iOS] Browsers on iOS can't access device camera on WebGL builds
Steps:
1. Create a New project
2. Import user's attached unitypackage "iossafaricantaccess.unitypackage"
3. Project Settings > Player > Publishing Settings > Compression Format : Disabled
4. Build
5. Upload to app.netlify.com/ or another HTTPS server
6. Launch the website on iOS device
Expected: device camera view is shown on the screen.
Actual: an error is shown on the screen:
abort({}) at jsStackTrace@... (see attached screenshot "IMG_0066.PNG"
Reproduced with: 2018.4.28f1, 2019.4.14f1, 2020.1.12f1, 2020.2.0b11, 2021.1.0a4.
Reproduced on:
iPhone 7 Plus, iOS 12.0 with Safari, Google Chrome and Firefox browsers.
Not reproduced on:
VLNQA00334, Xiaomi Mi A3 (Mi A3), Android 10, CPU: Snapdragon 665 SM6125, GPU: Adreno (TM) 610 with Chrome
VLNQA00229, Oneplus OnePlus6T (ONEPLUS A6013), Android 9, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630 with Chrome
Script:
using UnityEngine;
using UnityEngine.UI;
public class test : MonoBehaviour {
private WebCamTexture cameraTexture;
void Awake() {
cameraTexture = new WebCamTexture(WebCamTexture.devices[0].name, Screen.width, Screen.height);
GetComponent<MeshRenderer>().material.mainTexture = cameraTexture;
cameraTexture.Play();
}
}
Comments (2)
-
kimvasquez17
Feb 25, 2022 03:31
This is fixed, but only the front camera is working.
-
Marks4
Dec 11, 2020 22:19
I am glad to know that my other 2 bug reports regarding accessing the device camera on webgl are fixed and in review. This one's being a tough nut to crack? Any ETA?
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note (fix version 2021.1):
fixed in 2021.2.0a5