[SOLVED] No webcam if following instruction


#1

http://valtechar-com.stackstaging.com/

hello,

I’m following this regarding iframe embedding
https://developer.playcanvas.com/en/user-manual/publishing/web/self-hosting/

Forked project is ar-starter-kit

The problem is that while I can see playcanvas loading screen, i will never reach the camera feed on both desktop and mobile.

It works fine with the direct link. Any idea?

Thank you

Mykel


#2

When you get issues like this, sometimes there are clues or error messages in the browser’s developer console. In this case, the following warning came up. The line about getUserMedia is useful:

Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
playcanvas-stable.min.js:35 Powered by PlayCanvas 1.10.5 a18aeb8
playcanvas-stable.min.js:811 The Web Audio autoplay policy will be re-enabled in Chrome 71 (December 2018). Please check that your website is compatible with it. https://goo.gl/7K7WLu
a @ playcanvas-stable.min.js:811
/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
2__game-scripts.js:26 [Deprecation] getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
ArCamera.enterAr @ __game-scripts.js:26

#3

You need to serve your app from https. http will not work.

And I quote:

Starting with Chrome 47, getUserMedia() requests are only allowed from secure origins: HTTPS or localhost.

You should check the JavaScript console for your apps: