WebCam widget

Hi!

I published, yet another vaadin add-on:
WebCamForVaadin
. 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:

Cheers,
Johannes

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
!

Johannes

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.

Johannes

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?

Regards,
–alex

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} vaadin.com), 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!

Regards,
Johannes


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

-Johannes


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…

Hi!
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.

Thanks

The same here after webcam.capture();

In Google Chrome (12.0.742.112) and Firefox (5.0). Ubuntu and flashplugin-installer (10.3.181.34ubuntu0.10.10.1 !)
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!

Hi,

First, sorry this long delay :frowning:

I finally updated the add-on. It has now possiblity to use different image resolutions:
http://vaadin.com/directory#addon/webcamforvaadin
.

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,
Johannes

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.

Thanks

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,
Johannes

Johannes,

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

Johannes,

It looks like the online demo is working OK.

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

Thanks

Elvin L Reyes

Hello!
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(JsonPaintTarget.java:420)
	at org.vaadin.webcamforvaadin.WebCamForVaadin.paintContent(WebCamForVaadin.java:120)
	at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
	at com.vaadin.ui.AbstractOrderedLayout.paintContent(AbstractOrderedLayout.java:171)
	at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
	at com.vaadin.ui.AbstractOrderedLayout.paintContent(AbstractOrderedLayout.java:171)
	at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
	at com.vaadin.ui.Panel.paintContent(Panel.java:255)
	at com.vaadin.ui.Window.paintContent(Window.java:632)
	at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
	at com.vaadin.ui.Window.paintContent(Window.java:655)
	at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.writeUidlResponce(AbstractCommunicationManager.java:954)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.paintAfterVariableChanges(AbstractCommunicationManager.java:841)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:767)
	at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown 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!!!
Florian