Results 1 to 2 of 2
  1. #1
    Jakester is offline Member
    Join Date
    Oct 2008
    Posts
    3
    Rep Power
    0

    Wink Working With Webcams

    I have a client, He has a webcam hooked to a local machine. He uses this open source phpBMS software on a webserver. I have set up a simple object so he can upload a picture for his client to the server and have it named appropriately so he can associate it with a client. Trouble is that he wants to be able to view and control the webcam through the computer attached in teh browser so he can see the current picture, snap it then we can upload the picture to his server.Can one develop an applet or an app that can be embedded, take the picture as maybe an <object> include on a webpage? Even though this is a server based program, the camera will be controlled by the local machine..

  2. #2
    c0elh0 is offline Member
    Join Date
    Oct 2008
    Location
    Lisbon, Portugal
    Posts
    14
    Rep Power
    0

    Default

    You can't control directly the webcam with the client. but when you open your URLConnection you can write along with the url a "state".
    something like this:

    Java Code:
    URLConnection urlConn;
    URL myUrlHTTP;
    
    String host = yourServer;
    String httpPort = yourPort; (by definition 80)
    String state = "state=takePictureFromWebCam&";
    
    String myAdress = "ht tp://" + host + ":" + httpPort + "/" + state;
    
    
     myUrlHTTP = new URL(myAdress);
     urlConn = myUrlHTTP.openConnection();

    The server catch the hole url (myAdress) as a string and then:

    Java Code:
    if(serverState == "state=takePictureFromWebCam&" )
       (write code to take the picture with the webcam)
    Hope I helped somehow...

Similar Threads

  1. client not working
    By hit here in forum New To Java
    Replies: 2
    Last Post: 08-10-2008, 02:00 AM
  2. ant no longer working
    By varun077 in forum Eclipse
    Replies: 1
    Last Post: 07-25-2008, 10:57 AM
  3. Replies: 8
    Last Post: 05-28-2008, 08:00 AM
  4. Working With ANT
    By JavaForums in forum Eclipse
    Replies: 0
    Last Post: 04-26-2007, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •