The webcam access demo at the following link works in my browsers, but my
attempt to access my webcam from inside JHS fails.

https://davidwalsh.name/browser-camera
https://davidwalsh.name/demo/camera.php

​In the JS code below​ I only see the alert "MEDIA" if I leave off the
second part of the condition; that is I DO get the alert if the condition
is simply "if(navigator.mediaDevices)".

​Could the reason be that I have not found a way to INClude​ webgl (that
is, use INC=:webgl)? I have not found a way to do that.

Another idea for the reason of the failure is that
"navigator.mediaDevices.getUserMedia"
requires some permission of the user, which is JHS, I presume, that I don't
know how to provide.


JS=: 0 : 0
function ev_body_load(){init();}
function init() {
        var canvas = document.getElementById("glcanvas");
        gl = canvas.getContext("webgl");
if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia ) {
alert("
​MEDIA
");
}
}
​)​

-- 
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to