WebCamForVaadin
WebCam for Vaadin
WebCam widget for Vaadin via flash.
Quick Start Guide
- make a new Vaadin project with latest Vaadin 6.6.x
- download and copy the WebCamForVaadin add-on into WebContent/WEB-INF/lib
- download and copy the Refresher add-on into WebContent/WEB-INF/lib
- compile widgetsets
- make simple program to add WebCamForVaadin component into your application
- start server and access your app's url (include '/' symbol in the end of the url)
Sample code
public class WebcamtestApplication extends Application implements WebCamListener { private Window mainWindow; private WebCamForVaadin webcam; private Refresher refresher = new Refresher(); private Embedded image; @Override public void init() { refresher.setRefreshInterval(1000); mainWindow = new Window("WebcamApplication"); mainWindow.addComponent(refresher); webcam = new WebCamForVaadin(this); mainWindow.addComponent(webcam); image = new Embedded("Image from webcam", null); mainWindow.addComponent(webcam); mainWindow.addComponent(image); setMainWindow(mainWindow); } public void onImageReady() { StreamResource picture = webcam.getPicture(); picture.setMIMEType("image/jpeg"); image.setImmediate(true); image.setMimeType("image/jpeg"); image.setSource(picture); mainWindow.requestRepaint(); } public void onError(String errorMessage) { } }
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
a bug fix
- Released
- 2012-01-16
- Maturity
- BETA
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 6.0+
- Browser
- Internet Explorer
- Internet Explorer
- Internet Explorer
- Firefox
- Opera
- Safari
- Google Chrome
- Internet Explorer
WebCamForVaadin - Vaadin Add-on Directory
WebCam for VaadinIssue Tracker
Discussion Forum
Online Demo
Source Code
WebCamForVaadin version 0.1.0
null
WebCamForVaadin version 0.1.1
Major bug fixes
WebCamForVaadin version 0.1.4
- bug fixes
- code cleanup
- some incomplete features added
WebCamForVaadin version 0.2.1
- Still experimental
- First solution for sending images in the upload request into the server side
WebCamForVaadin version 0.3.0
- Bug fixes
- API cleanup
- Code cleanup
- ICEPush integration for the request initiated refreshes
WebCamForVaadin version 0.4.0
- jpg encoding!
- neater flash side capture button
- etc.
WebCamForVaadin version 0.5.0
Added picture resolution changing possibility
WebCamForVaadin version 0.6.0
Major refactoring and code cleanup. The add-on uses now StreamVariable instead of Upload hack. It requires at least Vaadin 6.5.x but 6.6.X is recommended.
WebCamForVaadin version 0.6.5
* capture button image's resource path fix
* simplifying the API a little bit
WebCamForVaadin version 0.6.6
a bug fix