One thing that I remembered right now was that the problem showing the capture button might be due the problem finding the path to image resource. The image resource couldn’t be found if the URL in the browser doesn’t end with ‘/’ symbol thats stupid thing and I have to fix it asap.
I finally had time to look the WebCamForVaadin add-on, and I noticed that there was a nasty bug in the path for the capturebutton image. Also the example code in the Directory was very badly outdated.
I updated the add-on and example code and I hope it will work now better! Please, let me know if there still exists some problems with it!
I just added the WebCam widget to my application but I get an error. However the online demo seems to be working fine.
This is my situation: In my application I create a modal window and put the widget and refresher as described in the vaadin directory. When a user clicks a certain button in my application this window pops… The modal window appears together with the webcam widget(which is not working)
Also an alert window appears with the following message:
Cannot call method ‘toString’ of undefined: fxwebcamforvaadinPID_SVAADIN_WEBCAM_PID name: fxwebcamforvaadinPID_SVAADIN_WEBCAM_PID
Hello, friends!
Really need help with this useful Addon!
I want to use WebCamForVaadin but in all the cases i tried, i got an JS runtime error with message like that:
"
Cannot convert ‘d’ to object: fxwebcamforvaadinPID_SVAADIN_WEBCAM_PID name: fxwebcamforvaadinPID_SVAADIN_WEBCAM_PID".
This message appears when flash-content is still loading… then after closing error-window, flash wakes up and camera began to work, and even Capture button works well…
I’m using last Vaadin 6.7.0 (but tried versions from 6.6.0), GWT 2.4.0(but tried with 2.3.0), IDE - NetBeans 7, also I’ve tried to build Add-On in my environment, but without any success(but may be i’m not very expirienced in add-on building)… and by the way, in the beginning of my experiments, variable that cannot be converted ( in error message) was not ‘d’ but ‘e’, and this is also very strange, as for me
Also i’d thoughts about rights-management for Flash… but even with saved permissions for host with “Allow” value… the same situation.
Web-camera is important part of my project and i would be very grateful for any help! Thank you in advance!
PS. Probably anyone could suggest another good way to access WebCamera from Vaadin? I discovered and tried to use JMF, but… WebCamForVaadin’s approach completely overwhelming!
I found a small amout of time to look this project.
I have now created an example Vaadin project (WebCamTest) that uses the WebCamForVaadin add-on. Could you please test whether the example project works for you?
If it works ok, feel free to use it as a basis of your own project. To be sure that project will be similar to mine I recommed you to use the Eclipse Java EE IDE for Web Developers and latest Vaadin Eclipse plug-in with it. And, please tell me if it doesn’t work…
Is it possible to set WebCam Widget in order to act as a Red5 or Wowza client ?!
I am trying to get access to webcam/ipcam from a swf module resource using vaadin(theme resource),
but I’m not getting this approach to work as required. I need to access webcam.
Yes. It is possible to use Red5 and Wowza Client using WebCamForVaadin. I had only to adjust mxml file in order to do that.
Although, I’ve acessed webcam without WebCamForVaadin add-on. It has required only to design a swf module, and build a Embedded Object point out to this module. Besides, it is necessary to setType to Embedded.TYPE_BROWSER and voilà.
I have already using this Web Cam application.
Now i want to store this captured image into my server side machine .
please tell me how i can do this task
I’ve never used this widget - but, as a quick look at the code, you can access the current picture as a StreamResource by WebCamForVaadin#getPicture(). The following is the sort of code that might work. Note I have not tried this, as I don’t have the add-on (nor, indeed, a webcam!)
StreamResource pic = webcam.getPicture();
if (pic != null) {
try {
BufferedInputStream in = new BufferedInputStream(pic.getStream().getStream());
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("C:/temp/mypicture.jpg", false));
byte[] buffer = new byte[32 * 1024]
;
int len;
while ((len = in.read(buffer)) > 0) {
out.write(buffer, 0, len);
}
in.close();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}