Quantcast
Channel: Questions in topic: "webcam"
Viewing all articles
Browse latest Browse all 256

Why can't my webgl app find any camera on iphone

$
0
0
1. It is a WebGL app, tested on 2019.3 - 2020.3 2. I'm 100% sure SSL/SSH is enabled 3. PC, Android are working fine. 4. on IOS Debug log is "webcam found, count: 0" Code: public MeshRenderer[] renders; private WebCamTexture[] cams; IEnumerator Start() { findWebCams(); yield return Application.RequestUserAuthorization(UserAuthorization.WebCam); if (Application.HasUserAuthorization(UserAuthorization.WebCam)) { Debug.LogError("webcam found, count: " + WebCamTexture.devices.Length); cams = new WebCamTexture[WebCamTexture.devices.Length]; for (int i = 0; i < cams.Length; ++i) { cams[i] = new WebCamTexture(); cams[i].Play(); renders[i].material.mainTexture = cams[i]; } } else { Debug.LogError("webcam not found"); } } void findWebCams() { foreach (var device in WebCamTexture.devices) { Debug.Log("Name: " + device.name); } }

Viewing all articles
Browse latest Browse all 256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>