Saturday, June 2, 2012

Accessing WebCam within JSP

I keep getting questions about how we can use web camera inside jsp files , in this post i will show you how to use the web cam from within jsp file.


We will use jQuery wrapper of flash plugin for that..
My reference in that is http://www.xarg.org
There is a guide you can follow instead of my post: http://www.xarg.org/project/jquery-webcam-plugin/
Here is the simplified steps:
1.Create resources folder with the following content from the mentioned web site:
jquery.js
jquery-1.js
either : jscam.swf or jscam_canvas_only.swf

2.Create JSP file and put the following code:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<title>Test Web Cam</title>
<style type="text/css">
#webcam, #canvas {
    width: 320px;
    border:20px solid #333;
    background:#eee;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
}

#webcam {
    position:relative;
    margin-top:50px;
    margin-bottom:50px;
}

#webcam > span {
    z-index:2;
    position:absolute;
    color:#eee;
    font-size:10px;
    bottom: -16px;
    left:152px;
}

#canvas {    border:20px solid #ccc;
    background:#eee;
}
</style><script type="text/javascript" src="resources/jquery-1.js"></script>
<script type="text/javascript" src="resources/jquery.js"></script>
</head><body>
<p id="status" style="height:22px; color:#c00;font-weight:bold;"></p>
<div id="webcam">
    <span>Your WebCam should be here!</span>
</div>

<p style="width:360px;text-align:center; ">
    <a href="javascript:webcam.capture(3);changeFilter();void(0);">Take a picture after 3 seconds</a> |
    <a href="javascript:webcam.capture();changeFilter();void(0);">Take a picture instantly</a></p>

<script type="text/javascript">
var pos = 0;
var ctx = null;
var cam = null;
var image = null;

var filter_on = false;
var filter_id = 0;

$(function() {

        var pos = 0, ctx = null, saveCB, image = [];
        var canvas = document.createElement("canvas");
        canvas.setAttribute('width', 320);
        canvas.setAttribute('height', 240); 
        if (canvas.toDataURL) {
                ctx = canvas.getContext("2d");             
                image = ctx.getImageData(0, 0, 320, 240);
                saveCB = function(data) {                       
                        var col = data.split(";");
                        var img = image;
                        for(var i = 0; i < 320; i++) {
                                var tmp = parseInt(col[i]);
                                img.data[pos + 0] = (tmp >> 16) & 0xff;
                                img.data[pos + 1] = (tmp >> 8) & 0xff;
                                img.data[pos + 2] = tmp & 0xff;
                                img.data[pos + 3] = 0xff;
                                pos+= 4;
                        }
                        if (pos >= 4 * 320 * 240) {
                                ctx.putImageData(img, 0, 0);
                                $.post("/TestWebCam/UploadServlet", {type: "data", image: canvas.toDataURL("image/png")});
                                pos = 0;
                        }
                };
        } else {
                saveCB = function(data) {
                        image.push(data);                       
                        pos+= 4 * 320;                       
                        if (pos >= 4 * 320 * 240) {
                                $.post("/TestWebCam/UploadServlet", {type: "pixel", image: image.join('|')});
                                pos = 0;
                        }
                };
        }
        $("#webcam").webcam({
                width: 320,
                height: 240,
                mode: "callback",
                swffile: "resources/jscam_canvas_only.swf",
                onSave: saveCB,
                onCapture: function () {
                        webcam.save();
                },
                debug: function (type, string) {
                        console.log(type + ": " + string);
                }
        });

});
</script>
</body>
</html>

3.Create a Servlet named: UploadServlet with the following code:
package osa.ora;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * UploadServlet
 * Author Osama Oransa
 */
public class UploadServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {

    private static final long serialVersionUID = 529869125345702992L;
    public UploadServlet() {
        super();
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("SAVING>>>>>>>>>>>>>>>>>>>>");
        String type = request.getParameter("type");
        String image = request.getParameter("image");
        System.out.println("SAVING>>>>>>>>>>>>>>>>>>>>Type=" + type);
        System.out.println("SAVING>>>>>>>>>>>>>>>>>>>>data=" + image);
        if (type != null) {
            return;
        }

        String byteStr = image.split(",")[1];
        byte[] bytes = Base64.decode(byteStr);
//Now you have the image bytes ready to save in File/DB/....etc..

//Or use the pixel data for old browser and convert the pixel comma separated values into int[] then call methods similar to the following one:

public static Image getImageFromArray(int[] pixels, int width, int height) {
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
WritableRaster raster = (WritableRaster) image.getData();
raster.setPixels(0,0,width,height,pixels);
return image;
}
    }
}
           
This will show you the encoded png data ...you can decode it or keep it encoded , save it to DB ...etc...
If you are doing a video chat application you need to capture the images in periodic manner and upload it , you may include the source & destination ids to distribute the chat images correctly..

This code only works with integrated camera in the laptop not with USB external camera.

These are simplified steps so you can copy and paste and let it work easily.
But in case you need more details , you may refer to the original URL for more clarification on how to control it more..

NOTE:
Another alternative is to use the following project:  https://github.com/jhuckaby/webcamjs

199 comments:

  1. I need your help sir. I have followed your tips above, but I still confuse to make UploadServlet. In what format UploadServlet is made, in PHP format or other format.

    I'm waiting for your respond thank you.

    ReplyDelete
    Replies
    1. Complete code is posted , this is a Java servlet, but you can still do it in any other language , just you need to get the 2 request parameters and process them.

      Delete
    2. Thank You very much for your respond.

      Delete
  2. could you please post what need to do with USB web cam with a desktop pc?

    ReplyDelete
  3. These information is extremely superb and very much useful. I will sure try to make use web cam from within jsp file. Keep on posting such wonderful information.

    remote computer access

    ReplyDelete
  4. I think the js files is not longer available into that page you mentioned before. Please, I would need jquery.js and jquery-1.js files... where can I found it?

    ReplyDelete
    Replies
    1. Send me your email to send you both files.
      Thanks,
      Osama

      Delete
    2. prashant16031987@gmail.com please send me all js file thanks in advance

      Delete
  5. i need files jquery.js and jquery-1.js please...or where can I get it?

    ReplyDelete
    Replies
    1. Send me your email to email to you these files, but you can even use higher versions if you want ..

      Delete
    2. Send me your email if your Google search failed to get them :)

      Delete
  6. I have tried above code, downloaded the resources folder file for which you had given the link , but the problem is jquery-1.js is not available on the site which u mentioned and result is webcam is not on webpage, its just showing "Your webcam is visible here"

    ReplyDelete
    Replies
    1. send me your email to send you the js files :)

      Delete
    2. hi sir,plz send me the jquery.js and jquery-1.js file my mail id is----ayush111991@gmail.com

      Delete
    3. Please send me files
      imisweet1@gmail.com

      Delete
    4. Please send me the files on vandramitul123@gmail.com
      I have tried your code all works good except i see no web camera but a black area which says your webcam should be here. Thank you !

      Delete
  7. Great work man, I tried this code and working great for me. I tested this code in my PC with the USB camera. Its working for me. I can able to Run this code in all browsers (IE 8, Chrome, Firefox)

    ReplyDelete
    Replies
    1. sir can you give me this code . i also need this one in my project .
      my email-id: anilchaudhari.iet89@gmail.com

      Delete
  8. I can able to load the webcam in my browser, but i have a problem in taking the snapshot.

    ReplyDelete
  9. i can't find these .js files.. please send them on khushbu.mathur@yahoo.in

    ReplyDelete
  10. Hi, I need the .js files, how I can get this files? can you send me mail? javierpolo@outlook.com
    Best regards,
    Javier Polo

    ReplyDelete
  11. I have tried above code, downloaded the resources folder file for which you had given the link , but the problem is jquery-1.js is not available on the site which u mentioned and result is webcam is not on webpage, its just showing "Your webcam is visible here"

    ReplyDelete
    Replies
    1. Hello, i have the same probleme i can't find (jquery.js and jquery-1.js) . please tell me where I can find it
      please :)

      Delete
    2. Mr.Osam, I also couldn't find the (jquery.js and jquery-1.js) files. Can you please send me the whole project at MNaveedKaleem@gmail.com along with these files as well the jsp & servlet class files. Thanx
      P.S looking forward to hear from you soon.

      Delete
  12. I sent the required file to all requests that come to me .. enjoy :)

    ReplyDelete
  13. Hi! I'm trying to find the .js files required for the codes to work. Couldn't find them at the given link. Do you mind sending me those files? Greatly appreciate it!

    ReplyDelete
  14. hi,i have tried it and it run propery but servlet file is not cal. and give me suggestion how to store this images into database plz....

    ReplyDelete
    Replies
    1. What is the issue ? you can send me the issue or your project to analyze ..

      Delete
    2. sir, the issue is i don't know how to cal this servlet file, is there any save button or any link on clicking which the servlet file is cal. and i m working on virtual classroom project so i have to store the video throgh webcam in database so i also need help from you..plz give me some suggestion

      Delete
    3. Can you send me your email so I can suggest you what to do..
      Thanks

      Delete
  15. Hey Osama,
    These files are needed:
    jquery.js
    jquery-1.js

    Or I can use the latest version of jQuery???

    ReplyDelete
    Replies
    1. Hello,
      Either try the latest or send me your email to send across..

      Delete
    2. I use latest jquery file (jquery-2.0.3.js) but till now, its not working... send me both files man. my id is "xshailendra@gmail.com"

      Delete
  16. Hello, thanks for the demo, but still can't find the js files on the web , would please send them to me ??? "achrafelouahdi@gmail.com"

    ReplyDelete
  17. Hello Sir
    Please mail me the jquery-1.js file.My email ID is akhilesh.taurus@gmail.com. When I run the jsp file,the camera does not initialize in the browser window and it just displays "Your webcam should be visible here!".Please reply ASAP.
    Best Regards,
    Akhilesh Jain

    ReplyDelete
  18. Hello Sir
    Please send js files to me. "shahmar92@gmail.com"

    ReplyDelete
  19. can i get the both file....
    files jquery.js and jquery-1.js

    ReplyDelete
  20. Respected Sir,
    I want to access the webcam from a java servlet. I had read all your article. It's superb. But the problem is I am not able to find the two .js files i.e the jquery.js and jquery-1.js. If you can please tell me where would I find it.

    ReplyDelete
  21. plese sent me all the .js file .Can i implement this code with USB Camera

    ReplyDelete
  22. sir.please forward me the js files

    ReplyDelete
  23. Sir,

    i am not able to save the image to my system it says base64 cannot be resolved i have used the package page import="sun.misc.*, how can i save please help me

    ReplyDelete
    Replies
    1. man, download any Base64 encoding java class and use it :)

      Delete
  24. Sir,

    im having a lil problem with my application, cause im trying to send the data by post method to my Servlet, but doesnt work, nothing happenning when jquery active the post method, im using richfaces in my project, so i cant use the files that you said, but the cam is working fine, only not sending to my servlet, that files influence in post method? u have any idea how to solve my problem? pls help me!

    ReplyDelete
  25. hia sir,i need your help sir, i followed above steps but i have problem how to uploadservelet. i need to use video chat using jsp or servlet.plz send me code details in link .......

    ReplyDelete
    Replies
    1. What is the issue in upload servlet? can you explain so i can help you ?

      Delete
  26. Hi Osama,

    I need to see the output. I copied the code of jsp and servlet exactly what you have given.
    I do not have the required js files. I want to run the web project now. Share with me please.sharing code will be fine.I tried to run the project with jquery.webcam plugin but its not showing the camera.

    ReplyDelete
  27. it works fine in chrorowsersme but will it work in ie8 and later browsers and Mozilla? I need urgently, please reply

    ReplyDelete
  28. Hello Sir,
    I am having a program named as visitor management system, now my requirement to capture the photo by "logitec" webcam by jsp and show in the jsp it self (there should be two image box first for image capturing and showing image after capturing). that means capturing should be done by jsp and shown in jsp it self then store in database after accept. Please give me solution how to do it? my mail id is "abhishek1986.1986@gmail.com"

    ReplyDelete
  29. Hi Osama,

    This blog is really great . I have tried ur example but i am getting the js error ...webcam is not the function. I have jquery-1.9.0 js file and im using jscam.swf . Do i also require jquery.js . If so ..plz send me to this below id :
    vkumar9.kumar063@gmail.com.

    Thanks

    ReplyDelete
  30. Hi Osama,

    In my previous question .I was missing webcam plugin . So, i have added the plugin. It's successfully connected to my webcam .But i am getting another js error changeFilter() not defined. Can u plz explain me?


    Thanks

    ReplyDelete
  31. Hi ,
    Is there any js function to stop the cam

    ReplyDelete
  32. paramsaini@yahoo.com , please send .js files here

    ReplyDelete
  33. hi Osama, can email me the js file ? Thank you

    ReplyDelete
  34. Hi Osama , can email me the js files ? greatly appreciated "hcwong"

    ReplyDelete
  35. hi Osama, can email me the js file ? hcwong@financial-link.com.my Thank you

    ReplyDelete
  36. Please send the required js files.

    ReplyDelete
  37. Hi, I need the .js files, how I can get this files? can you send me mail? deepa14155@gmail.com

    Best regards,
    Deepa

    ReplyDelete
  38. Hi Osama

    These files are needed:can email me the js files ? deepa14155@gmail.com
    jquery.js
    jquery-1.js

    Regards
    Deepa

    ReplyDelete
  39. hi osama

    i have tried it and it run properly in Morzila but not in IE 8 and Chrome 32.0.1700.107 version. it's detecting webcam but not showing image.

    Please assist.

    Regards
    Deepa

    ReplyDelete
  40. Hi Could you please share the required js files or host it on the site, available to copy or download.

    ReplyDelete
  41. hi please email me the both js files to whchek@hotmail.com .Thank you

    ReplyDelete
  42. Hello Sir,
    I am trying to capture image from webcam of a client and save it on the server, when client presses a button on a JSP page. Can you please share the following files with me
    1. jquery.js
    2. jquery-1.js
    3. jscam.swf
    4. jscam_canvas_only.swf
    My email id is meetmanojit@gmail.com.
    Thanking you in advance,
    Manojit Saha

    ReplyDelete
  43. Please send me all the .js files as I'm not able to retrieve them from link you provided.

    ReplyDelete
  44. I am trying to capture image from webcam of a client and save it on the server.So, can u please provide me with a way to do so and also please send me all the .js files.

    ReplyDelete
    Replies
    1. send me ur email, also follow the instructions above to do what u want.

      Delete
  45. I have also got the same error sir please send me the .js files on the below email id
    meeraanadkat@yahoo.com

    ReplyDelete
  46. Where do we need to create the java file for servlet? Generally we create the servlets inside /WEB-INF/src, so is it the required folder where we have to create our servlet?

    Please reply at vishalchugh.cse15@jecrc.ac.in.

    ReplyDelete
    Replies
    1. Sorry , in any IDE you just need to create Servlet in any source package and the compiler will place it in the correct location.

      Delete
  47. please send js files to abhishek.kumar627@gmail.com

    ReplyDelete
  48. can you send me the .js files asap
    my email is shubh.8990@gmail.com

    ReplyDelete
  49. Sir I need jquery.js and jquery-1.js. My mail id is satishsubudhi522@gmail.com

    ReplyDelete
  50. Hi Osama,
    Can please you send me jquery.js and jquery-1.js file to my email alex_pato77@hotmail.com.
    And i want ask you, is the picture that we take are save into local hardisk in pc or laptop?,
    if not, can you help me to display the picture that we save in jsp page?

    Thanks for your help.

    ReplyDelete
  51. Hi Osama can you send me jquery.js and jquery-1.js to my email alex_pato77@hotmail.com.
    Thanks for your help.

    ReplyDelete
  52. Sir, I can't find these js files. Please send me these js files to joyparitosh@gmail.com

    ReplyDelete
  53. Hi Sir,

    Please send me all the .js file i am in middle of a project.
    kkscwcd@gmail.com

    ReplyDelete
  54. I have also got the same error sir please send me the .js files on the below email id
    shwshank3@gmail.com

    ReplyDelete
  55. Dear sir,
    Can you send me the all.js files, my email is rameshram5151gmail.com
    Thanks in Advance.

    ReplyDelete
  56. hy mr. osama ...
    i have case / job from my campus to make app in jsp can get picture from webcam
    i try you code.. and stuck at jquery.js and jquery1.js ..
    please you send it to me and aprodit31@gmail.com :D
    thanks before sir ;D

    ReplyDelete
  57. Hello Osama
    Have tried your code but m not getting anything.....
    Only one message is coming i.e Your WebCam should be here.
    can you please guide me
    please send me all js file.
    my email : ripul.ku@gmail.com

    ReplyDelete
  58. hello sir,
    I need the js files. Please sent me. My email address is rajaramise@gmail.com

    ReplyDelete
  59. hello sir, I have tested with your js files.It renders the web cam interface in IE8 but when i click on take photo button it can't create base64 string in ie8. Can u please refer me any solution for IE8. Because in IE8 it generates different string format from which image fille can't be created from the servelet

    ReplyDelete
    Replies
    1. Can you clarify what is the issue with the String format ?

      Delete
    2. Sir I am using java. If you can suggest any java function that can generate an image file from that string format which i have sent to u it will be very helpful for me. Thanks in advance

      Delete
    3. When i tried in IE 11 it is working fine, I don't have IE 8 to identify the issue.

      Delete
  60. The method uses 2 ways either the encoding image type (for new browsers with supported method canvasToDataURL() ) or pixel data, for pixel data you can use method like the following one to construct the image in Java side:
    public static Image getImageFromArray(int[] pixels, int width, int height) {
    BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
    WritableRaster raster = (WritableRaster) image.getData();
    raster.setPixels(0,0,width,height,pixels);
    return image;
    }

    ReplyDelete
  61. Hi
    I am try to get you above code working. But I having aproblem to find this file in your download. Please can you email this file.

    1. jquery.js
    2. jquery-1.js
    3. jscam.swf
    4. jscam_canvas_only.swf
    my emai address: ishfady@yahoo.co.uk

    many thanks

    ReplyDelete
  62. Hi
    Thanks for help I successfully implemented all the steps and its working fine for me.
    But my requirement is slight different. As we are using flash player for showing video by webcam, but my requirement is to stream the live video to media server using RTMP, so can you suggest me any solution or reference, link which will be helpful to me to stream video.
    Thank You.

    ReplyDelete
  63. i need js file please send me praveenspk02@gmail.com

    ReplyDelete
  64. Hi
    Please can you email this file.

    1. jquery.js
    2. jquery-1.js
    3. jscam.swf
    4. jscam_canvas_only.swf

    my email address is axay116@gmail.com

    ReplyDelete
    Replies
    1. Hi Osama,
      Appreciate if you could mail me all required js files to my email id girish.vkar@gmail.com .. :)

      Delete
  65. Hello Osama
    Have tried your code but m not getting anything.....
    Only one message is coming i.e Your WebCam should be here.
    can you please guide me
    please send me all js file.
    my email : dwie.oke@gmail.com

    ReplyDelete
  66. sir plz send me resurces folder as zip...my email is krishna14581@gmail.com
    Thank you

    ReplyDelete
  67. asak
    i would like to know if the code will work for live streaming over a webpage to be accessed over a phone with a html5 compatible browser without plugin.

    ReplyDelete
    Replies
    1. I don't think this is possible as it uses flash plugin.

      Delete
  68. hi,
    it`s give error "public static Image getImageFromArray(int[] pixels, int width, int height) " as illegal expression statement in servlet file
    replay me at axay116@gmail.com
    ty...

    ReplyDelete
    Replies
    1. Add the method code into your Servlet, see the post or HYG:
      public static Image getImageFromArray(int[] pixels, int width, int height) {
      BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
      WritableRaster raster = (WritableRaster) image.getData();
      raster.setPixels(0,0,width,height,pixels);
      return image;
      }
      }
      }

      Delete
  69. Hi ,

    Can u plz provide the code snippet to stop the cam via javascript

    ReplyDelete
  70. Hi
    Please can you email this file.

    1. jquery.js
    2. jquery-1.js
    3. jscam.swf
    4. jscam_canvas_only.swf

    my email address is minhson.nguyen6393@gmail.com. Thank you!

    ReplyDelete
  71. Hello Osama
    Have tried your code but m not getting anything.....
    Only one message is coming i.e Your WebCam should be here.and also i am getting error in servlet file for base64.decode(bytestr). and also in public static Image...
    can you please guide me.please send me all js file.
    my email:mallu12v@gmail.com

    ReplyDelete
    Replies
    1. Hi Friends i only see the message:

      Your WebCam should be here!

      and when see the console on my Chrome i see this message:

      TypeError: jQuery(...).webcam is not a function


      How to solve?

      Thanks

      Delete
    2. Check on another browser like IE ?

      Delete
  72. Hello Osama
    Have tried your code but m not getting anything.....
    Only one message is coming i.e Your WebCam should be here.
    can you please guide me.I am getting error in servlet program also. i.e for static method used in it. which package should i import?
    please send me all js file.
    my email : mallu12v@gmail.com

    ReplyDelete
  73. Hello,


    I need two js(jquery.js,jquery-1.js) file as require for webcam so pls send me those files as soon as possible to my below id:

    shahnamita94@gmail.com

    pls send me as soon as possible bcs it's too much urgent.Thanx in advance

    ReplyDelete
    Replies
    1. Hello,

      Thanx for sending files but just before that I have already tried with jquery.webcam.js and jquery.webcam.min.js file but webcam was not loaded and I have already found jquery.webcam.js file in your mail so pls suggest me whether I am using it wrong way or any other solution to use by perfect way those files and webcam can load

      Delete
    2. Most probably the dependency files are not working well, can you re-examine your code again and compare it with the blog steps.

      Delete
    3. Also try to test it in different browsers.

      Delete
  74. Hi Osama,


    Request youto send me two js(jquery.js,jquery-1.js) file as require for webcam to my below id:

    lalit.tgr8@gmail.com

    pls send me as soon as possible.Thanx in advance

    ReplyDelete
  75. Good.
    please send me all js file.
    eric@bcc-services.fr
    Thanx in advance

    ReplyDelete
  76. I need two js(jquery.js,jquery-1.js) files as require for webcam so pls send me those files as soon as possible to my below id:

    amarjyotib@gmail.com

    ReplyDelete
  77. Hi please send me those two js (jquery.js,jquery-1.js) files as early as possible to my mail id:
    vasu.ilu@gmail.com

    ReplyDelete
  78. Hi
    Please can you email following file. My email address is earthiscommontoall@gmail.com

    1. jquery.js
    2. jquery-1.js
    3. jscam.swf
    4. jscam_canvas_only.swf

    Thank you!

    ReplyDelete
  79. Hi Osama,

    Could you please share the two js (jquery.js,jquery-1.js) files with me too via email, my email id is: animesh1831991@gmail.com.


    Thanks.

    ReplyDelete
  80. Send me all the stuff as soon as posible thanks here my email id harry.telenor@gmail.com

    ReplyDelete
  81. sir, i need all these file. please send me on this email id: anilchuadhari.iet89@gmail.com

    thanks

    ReplyDelete
  82. sir i need a two js (jquery.js,jquery-1.js) files with me too via email, my email id is: parag.unadkat@yahoo.com

    ReplyDelete
  83. Good day, please i need
    1. jquery.js
    2. jquery-1.js
    3. jscam.swf
    4. jscam_canvas_only.swf
    My email is omotayojf@gmail.com

    ReplyDelete
  84. Hello, was wondering if you can send me all the Javascript files please, my email is kenteehee at gmail dot com

    ReplyDelete
  85. Plz Osama i would like u to send me the js files , and some suggestions to learn how to use a device( fingerprinter , webcam ...) with a robust java EE application ( that use spring jsf ..frameworks )
    PS : I already seen ur post about interactiv4j and i didn't understand very well
    thx in advance

    ReplyDelete
    Replies
    1. I don't believe it is possible to have a generic way to capture the fingerprint, even the webcam way described here using flash will no longer be valid in future.
      The other alternative is to have a standalone app that is installed on the client machine using webstart or wait for invention of a way using html5 or JS in the future.

      Delete
    2. yes it's impossible to do it generically , but for a specific USB external camera , what's the approache to deal with it ?

      Delete
    3. You may search for a flash plugin similar to the described one to do that.

      Delete
  86. ramz.souhail@gmail.com this is my email

    ReplyDelete
  87. hello Osama,

    i am trying to make a project about online tutorial in which live streaming of both teacher and student is required.

    I need to access the client's webcam and microphone through jsp page and live stream my webcam through java.

    Can you please help in lieu of this?

    My email id is anubhavmangla123@gmail.com

    ReplyDelete
    Replies
    1. I think it is better to make it client application on both sides, the demonstrated way above using Flash technology which will be dropped in modern browsers.

      Delete
    2. Okay

      The main trouble i am having is to live stream webcam.
      The access of the webcam and streaming it.

      Delete
    3. This is why you need to use client or browser plugin as modern platform like webex.

      Delete
  88. hi sir,plz send me the jquery.js and jquery-1.js file my mail id is--mohdshahidarafat@gmail.com

    ReplyDelete
  89. please i need
    1. jquery.js
    2. jquery-1.js
    3. jscam.swf
    4. jscam_canvas_only.swf
    My email is madhavan.ebidrive@gmail.com

    ReplyDelete
  90. Hi please send me the files and give me suggestion how it to DB. kor_mi@hotmail.com

    ReplyDelete
  91. Hi could you please send the following files in my mail.
    mail Id : gdpratyush9@gmail.com
    1. jquery.js
    2. jquery-1.js

    ReplyDelete
  92. please i need
    1. jquery.js
    2. jquery-1.js
    3. jscam.swf
    4. jscam_canvas_only.swf
    My email is whiteblizzard143@gmail.com

    ReplyDelete
  93. please send me js file with full programme iam in middle
    syeddeevan_samsudeen@thbs.com

    ReplyDelete
    Replies
    1. Hi Sir till now i didn't get js files please send me s.samsudeenjava@gmail.com waiting for your reply

      Delete
    2. The previous email was invalid, resent again.

      Delete
  94. my requirement is laptop to mobile video call using java technologies please tell me business logic of this or else send me source to s.samsudeenjava@gmail.com

    ReplyDelete
  95. sir,please send me

    1. jquery.js
    2. jquery-1.js files

    my email
    aksbb97@gmail.com

    thank you.

    ReplyDelete
    Replies
    1. Thank you sir for such a quick response.Received your mail.Code is working fine.

      Delete
  96. Hi
    I am try to get you above code working. But I having a problem to find this file in your download. Please can you email this file and upload servlet also i am facing some errors

    1. jquery.js
    2. jquery-1.js
    3. jscam.swf
    4. jscam_canvas_only.swf
    email is eswarankaliappan67@gmail.com

    ReplyDelete
  97. Hello sir,

    can you please be kind enough to email me .js file and .swf files ?

    kushal.k.agarwal@gmail.com

    Will be waiting for your reply...

    Thank you... :)

    ReplyDelete
    Replies
    1. Did not receive your mail. :-(

      kushal.k.agarwal@gmail.com

      Delete
    2. Sent many times, all return with failure notification.

      Delete
  98. plzzz send me all the .js files.....my mail id is nehapariyar75@gmail.com

    ReplyDelete
    Replies
    1. Remote host said:
      552-5.7.0 This message was blocked because its content presents a potential

      Delete
    2. You need non-gmail email account.

      Delete
  99. sir plzz send me again all the js files at another mail id:pariyarsonali@gmail.com

    ReplyDelete
  100. sir plz send me the 2 .js files
    rajwalswati213@gmail.com

    ReplyDelete
  101. sir plz send me both .js files. mailid is rajwalswati213@gmail.com

    ReplyDelete
  102. sir plz send the libarary on my mail Id
    jai.kishan@talent4assure.in

    ReplyDelete
  103. sir plz send the library fo jquery on mail
    mailid:- jai.kishan@talent4assure.in

    ReplyDelete
  104. can you please send me the whole project because I tried on my machine and video from the webcam is not shown. Instead it is written "Your WebCam should be here!".

    Email: raspawar007@gmail.com
    Thanks in Advanced.

    ReplyDelete
  105. please send me the js files meyogeshvalecha@gmail.com

    ReplyDelete