Hi everyone,
I'm currently trying fo find out an easy way to implement simple HTML5
mobile components, which allows the user to take pictures / videos
across multiple devices. One way which is working on almost every
devices is to use the input tag with the "capture" and "accept"
attribute. Example:
<input type="file" accept="image/*" capture="camera"/> (Shows an input
field which opens the camera on the mobile device)
What I made so far is to build a light weight javascript in addition
which hides this input field, instead using a full customizable label
and if a picture is uploaded it is shown with a correct aspect ratio in
an img tag. A little documentation can be found here:
https://github.com/klopfdreh/wicket-components-playground/wiki/13.-HTML5-MediaUploadField-API
What I dislike that this is not a straight implementation, because it
requires the dynamic css generation in render header, the javascript may
also be handled in a better way and the java source also requires a lot
of invocations. (see git repository)
Any suggestions to improve it and wdyt of this approach in general?
kind regards
Tobias