We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Online Capture (Read 977 times)
Online Capture
Feb 8th, 2007, 12:39am
 
Hi All,

I'm hoping to build a simple online app which saves a still from a users webcam and uploads it to a MySQl database.

But the 'using capture' example only works running in processing, but if i export it as a web applet, when run it does nothing - even locally.

Is it possible to get this to work? to start with I am hoping to just have the app import the default vid capture device or fail. and I assume the users might need to accept a certiicate (which I haven't done before)?

Any help HUGELY appreciated.

Re: Online Capture
Reply #1 - Feb 8th, 2007, 2:51am
 
you did read the reference first, right?
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Video;action=display;num=1169056064
Re: Online Capture
Reply #2 - Feb 9th, 2007, 3:23am
 
sorry fry - embarassed to say i missed that. got it to work after some more trawling though and thought i would post how for reference.

first i checked out this thread:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Integrate;action=display;num=1159386274;start=1#1

and made a .jnlp file containing the following but with my sketch name instead of 'ButtonJWS' and saved it in the applet folder from my exported sketch:

**************

<?xml version="1.0" encoding="utf-8"?>
<jnlp
 spec="1.0+"
 codebase="http://www.whatever.com"
 href="ButtonJWS.jnlp">
 <information>
   <title>Testing Processing via Java Web Start</title>
   <vendor>processing.org</vendor>
   <homepage href="http://www.processing.org"/>
   <description>Testing Processing via Java Web Start</description>
   <description kind="short">Processing is an open source programming language and environment for people who want to program images, animation, and sound.</description>
   <offline-allowed/>
 </information>
 <security>
   <all-permissions/>
 </security>
 <resources>
   <j2se version="1.4+"/>
   <jar href="ButtonJWS.jar"/>
 </resources>
 <application-desc main-class="ButtonJWS"/>
</jnlp>

************************

that thread pointed me to this tut:
http://wiki.jmol.org/index.php/Java_Web_Start

where i followed the steps under the heading "Signing the JAR File" and ran these commands from the osx terminal, the 'keytools' and 'jarsigner' app were already installed in OSX 10.4, so i just navigated to the applet folder in terminal and executed the commands:

keytool -genkey -keystore myKeystore -alias myself

keytool -selfcert -alias myself -keystore myKeystore

jarsigner -keystore myKeystore sketch_name.jar myself


this created another file in my applet folder. I then uploaded the folder to my server and went to the url and voila! it worked!
Re: Online Capture
Reply #3 - Feb 9th, 2007, 9:29am
 
great, thanks for the follow-up. that's useful info and i'll see about adding that to the reference as well.

you can also check the bug report for the capture stuff, which has a link for a successful signed applet that runs from a browser.
Page Index Toggle Pages: 1