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