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
- [URP] The number of Shader variants increases from 96 to 186624 when the Strip Unused Variants is set to 0
- Duplicate External Textures start appearing when a Texture created with "CreateExternalTexture" is modified causing Memory Usage spikes on VisionOS
- Silent crash when using a "Blend Shape" in a "Skinned Mesh Renderer" to move vertices to Vector3.positiveInfinity, and "Occlusion Culling" is baked
- Some Prefab Source and Override content bounds are misaligned
- The Package Manager's "install packages by..." panels break when Domain Reload is triggered, and the panel is open
Resolution Note (fix version 2021.1):
fixed in 2021.2.0a5