I finally have a simple working example for (relatively old) Chrome,
Firefox, and Opera browsers. But NOT for Safari.
Thanks for everyone's help.
coclass'webcam'
coinsert'jhs'
HBS=: 0 : 0
jhh1'webcam - https://davidwalsh.name/browser-camera'
jhhr
''
'snap'jhb'Snap Photo'
''
)
jev_get=: 3
This might be relevant:
https://stackoverflow.com/questions/12442864/chrome-webkitgetusermedia
"Though, after following this article, I came across a bug, which does
not allow one to load resource from localhost or one's machine on
Google Chrome(which might also be the case with you) and which ge
How about
1 0 1 0 1 0 (#~ ((-: & 0 1 0)"1 @: ({~ & z)))~ z
?
You can then "simplify":
First the hook (and {~&z)
([ #~ -:&0 1 0"1@:(z&{)@])~
([ #~ -:&0 1 0"1@:(z&{)@])~
Then ~ can be "distributed" over the resulting fork:
[~ #~ -:&0 1 0"1@:(z&{)@(]~)
] #~ -:&0 1 0"1@:(z&{)@[
You can keep going
I would write the original as:
z ([ #~ 0 1 0 -:"1 {) 1 0 1 0 1 0
3 4 5
Then to reverse the arguments you could do one of the following:
1 0 1 0 1 0 ([ #~ 0 1 0 -:"1 {)~ z
3 4 5
1 0 1 0 1 0 (] #~ 0 1 0 -:"1 {~) z
3 4 5
On Sun, Jun 4, 2017 at 1:45 PM, Michael Rice wrote:
>z
z =: 2 3 $ i.6
z
0 1 2
3 4 5
z { 1 0 1 0 1 0
1 0 1
0 1 0
(-: & 0 1 0) z { 1 0 1 0 1 0
0
(-: & 0 1 0)"1 z { 1 0 1 0 1 0
0 1
((-: & 0 1 0)"1 z { 1 0 1 0 1 0) # z
3 4 5
z #~ ((-: & 0 1 0)"1 z { 1 0 1 0 1 0)
3 4 5
z #~ ((-: & 0 1 0)"1 (1 0 1 0 1 0 {~ z))
3 4 5
z #~ ((-: & 0 1
David,
Yes, that looks good although I don't really think I am dealing with
polyfill (because I don't know what it is). I tried pasting that code
directly into my JHS and could not make it work.
Also, because you pointed me there, I looked more carefully at the original
link which had commented o
This looked interesting to me:
https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
Using the new API in older browsers
Here's an example of using navigator.mediaDevices.getUserMedia(), with a
polyfill to cope with older browsers. Note that this polyfill does not correct
I tried the same thing with Safari and Firefox, after only Chrome.
Only Firefox 48.0.2 accepts the whole condition.
I still don't have the camera view, but Firefox asked about my camera by
name.
So I'll likely be back with more questions.
But I still need to know how to trick the other browsers in
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 con