We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have captured and displayed the video from a MacBook Pro internal camera using image capture in a sketch.js running on a localhost (note - this won't run in Chrome simply trying to access the .index file, it needs to be launched from the localhost..) but I want to do this on an iPad using the Kiosk Pro app for a science exhibit. I can display a stored video/image on the iPad but not the real-time image from the internal camera. Any ideas that could assist in exploring how this might be done would be appreciated. The Kiosk Pro support people were unable to assist, but maybe someone in this great community can help!
Answers
To be clear: are you able to access the iPad cam at all from a p5.js sketch running on any iPad browser?
For example, are you able to get this demo sketch to work?
https://p5js.org/examples/dom-video-capture.html
If the answer is no, then is there a reason that you are trying to use Kiosk Pro on the iPad instead of a browser -- does that provide a localhost?
Just trying to understand the nature of the problem.
Thank you very much for responding - I'll try to clarify the problem.
The demo you cite does not run on an iPad by trying to launch it from the Safari browser.
Also I can't import a p5.js sketch (such as the example you cite) into an iPad and then launch it with the iPad browser in the same way it is done on the MacBook.
I've successfully run the example you cite using a MacBook Pro but this required setting up a localhost on the MacBook. I have no idea how to create an entity like a localhost on an iPad nor import a p5.js sketch into an iPad in a manner such that it can be executed.
Kiosk Pro allows you import folders into an iPad using Dropbox, then access the folder and launch it in the iPad browser - the cited example doesn't work because the index.html file is not in a "localhost" on the iPad.
Hope that provides a more effective description of the problem.
I haven't tried these, but here are some instructions for using iPad localhost via mobile Safari:
This might require that the iPad be tethered to a computer, I'm not sure.
Also, I believe that Coda for iPad app, "Diet Coda" will let you preview websites via localhost. Not sure if that is appropriate for a kiosk mode situation (or if either will give p5.js camera access), but it might be worth trying.
Jeremy,
Thanks again for taking the time to comment.
Obviously I have no experience in trying to develop/run software for use on an iPad, so any input is of value to me.
I will pursue the lines of inquiry you suggest and post any progress that I make.
I anticipate the challenge will be finding a way to have a Java Script "image capture" be able to find and use the iPad camera video stream. Since this apparently can be done in the Mac OSX - as demonstrated by that video capture example you cite - maybe it can be done in iOS - who knows??
Yes, if it will work, Diet Coda is probably your best bet.
Otherwise you would need to write an iOS app that uses their API for accessing the camera.
Good luck!