Hi,
I’m looking at http://demo.vaadin.com/parking/
“Take a photo” link works like native app.
Is it possible to send a video or sound recording like photo.
Thanks
Hi,
I’m looking at http://demo.vaadin.com/parking/
“Take a photo” link works like native app.
Is it possible to send a video or sound recording like photo.
Thanks
Yes, it’s possible. You just have to set the accept attribute on the input element. If you use the
EasyUploads
add-on, you can use the server-side UploadField.setAcceptFilter(String) method. So, for video you’d do
field.setAcceptFilter("video/*");
Or you can do it on the client side like it’s done in the parking demo:
https://github.com/vaadin/parking-demo/blob/master/src/main/java/com/vaadin/demo/parking/widgetset/client/ticketview/PhotoLayout.java#L65
There’s a live demo demonstrating the effect here:
http://longhandpixels.net/demos/mobilesafari-ios6/
Thanks. I will try it.