WebCam widget


I published, yet another vaadin add-on:
. The goal of this add-on is to provide access to users web camera from the Vaadin application. The add-on is still on experimental-state, but stay tuned, since there will be updates to it soon :slight_smile:


I, just updated the web camera widget add-on. Update contains several bug fixes, error handling feature, and couple of incomplete features.

Please, test
the online demo here


Seems to work well!

I think it’s still too slow. But, when I manage to get the upload-streaming to work it should be much faster and more flexible. Also the sending the image in the rgb pixel array is inefficient, packing the image with jpeg encoder should decrease the the transfer time between flash → clientside → serverside.


Hi Johannes,

Works very well! Is it possible to get the video input streamed? I see that the upload is not finished, if you need help I can spend some hours working on this so we can have streaming solution. Do you think it is possible?


Hi Alexander!

Thank you for your interest on this project! I suppose that video input is possible to get streamed with moderate amount of coding work. And, certainly, if you are interested to help implementing this feature I could grant you a commit rights to
the google-code project of webcam widget
Just send your gmail-address to my email (johannes {at}, and I’ll add it into project committers.

Currently, I have some uncommitted code. I’ll try to find time to review and clean up the code and commit it into the svn.

Best regards,
Johannes Tuikkala

The widget is evolving.

Just committed some changes which enables the sending the picture straight from the flash into server side trough upload-type post request! It still have some limitations and issues but the basic solution is anyway working :slight_smile:

Issues, TODO list:

  • URLRequest from the flash could not be triggered from the server side and needs the button in the flash to be clicked
  • The flash button is very crude
  • For some reason the Capture-button have to be clicked once before the flash button would start working
  • Image captured with flash button is not the latest image but one before it
  • Still not jpeg encoding

Any ideas and other contributions, including coding, are very welcome!


Realeased WebCamForVaadin 0.3 beta

List of main chainges

  • API cleanup (no need for refelction, url setting etc.)
  • bug fixes (flash side capture button should work now)
  • ICEPush integration for refreshing the captured image in the Embedded when the flash side capture button is clicked
  • code cleanup

Current TODO list

  • add jpeg encoding in the flash
  • make more polished flash side capture button
  • plan how to achieve video streaming


WebCamForVaadin 0.4 beta released

  • addded flash side jpeg encoding
  • added more polished capture button
  • did some code clean-up etc.

Next step would be to plan how to achieve video streaming into server side…

I receive Error #2176 from flash side. :frowning: What does it mean?
WebCamListener events are not fired. So I suppose problem on flash side…

Hi Basik, thank you for reporting then problem! The error relates to the security restrictions of the client side flash. How did you get this error: which browser, add-on version etc.

Anyway, I have to look at this add-on since it has not been updated so long time :frowning:

How can I set the width and the height to the webcam image? I want a 600x600px image.


The same here after webcam.capture();

In Google Chrome (12.0.742.112) and Firefox (5.0). Ubuntu and flashplugin-installer ( !)
Add-on version is the latest 0.4.0!

There are a few blog entries and other bug reports about this problem!

What a pity!


First, sorry this long delay :frowning:

I finally updated the add-on. It has now possiblity to use different image resolutions:

One caution: The add-on is tested with only with the Vaadin 6.4.8 (included in the add-on jar), it is not currently compatible with newest vaadin. I’ll take that problem under work as soon as possible.

With best wishes,

Ps. the online demo is not updated yet, working on that asap.

The add-on and the online demo are updated now. The latest version contains some code/api cleanup and major refactoring: it uses now a VaadinStreamvariable to transfer image from the flash side to the server (earlier the Upload hack was used).

Hi I can’t get to work the latest release; the error I am getting is this:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /WebCamForVaadin/.

Reason: Error reading from remote server

I also try the previous release and the capture button is not displayed, I wonder if I have the old flash object cached in some place. Do yo have any idea what is going on?

Any help will be greatly appreciated.


Hi Elvin! Is this proxy problem occuring with the online demo application or within your own development enviroment? If latter, what vaadin version, ide (eclipse…), server (tomcat…) and web browser you using when the problem occurs?

You have to clear your browser cache if you are switching between the different webcam add-on versions.

With best regards,


Thanks for your response. I am sorry I did not answer to you sooner, I’ve been so busy that I could not even connect to the internet.

I am having the problem in the demo, and also in my application. I am using vaadin 6.6.0 and Tomcat 6.0.26. I am not using eclipse, I am using Netbeans 6.9.

I did try deleting every browser history and it did not work, the funny thing is that I use Firefox, and if I try using IE the button does not appear either. Do you think I need to clean something at the flash player level?

Thanks in advance

Elvin L Reyes


It looks like the online demo is working OK.

I am going to try in my project and I will let you know.


Elvin L Reyes

I just tried to use the addon but it is not working I am getting the following exception:

SCHWERWIEGEND: Terminal error:
java.lang.NullPointerException: Parameters must be non-null strings
	at com.vaadin.terminal.gwt.server.JsonPaintTarget.addAttribute(
	at org.vaadin.webcamforvaadin.WebCamForVaadin.paintContent(
	at com.vaadin.ui.AbstractComponent.paint(
	at com.vaadin.ui.AbstractOrderedLayout.paintContent(
	at com.vaadin.ui.AbstractComponent.paint(
	at com.vaadin.ui.AbstractOrderedLayout.paintContent(
	at com.vaadin.ui.AbstractComponent.paint(
	at com.vaadin.ui.Panel.paintContent(
	at com.vaadin.ui.Window.paintContent(
	at com.vaadin.ui.AbstractComponent.paint(
	at com.vaadin.ui.Window.paintContent(
	at com.vaadin.ui.AbstractComponent.paint(
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.writeUidlResponce(
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.paintAfterVariableChanges(
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(
	at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at org.apache.catalina.core.StandardWrapperValve.invoke(
	at org.apache.catalina.core.StandardContextValve.invoke(
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
	at org.apache.catalina.core.StandardHostValve.invoke(
	at org.apache.catalina.valves.ErrorReportValve.invoke(
	at org.apache.catalina.valves.AccessLogValve.invoke(
	at org.apache.catalina.core.StandardEngineValve.invoke(
	at org.apache.catalina.connector.CoyoteAdapter.service(
	at org.apache.coyote.http11.Http11Processor.process(
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$ Source)
	at Source)

Is the widget compatible with the current vaadin version?, I am using Vaadin 6.6.4 in this project.

Thank you for your help!!!