HTML and CSS Reference
In-Depth Information
To actually take a picture, you tap or double-click the screen. Before doing so, users can further
tweak the camera options, or even set a timer. The Back button, visible at the top-left corner of the
screen, provides a way to return to the application without doing anything. When you click the Back
button, the app still considers the operation as completed successfully, except that no file will be
passed to the promise methods.
After tapping to take the picture, the dialog gives you a chance to crop the image or retake the
picture if you just don't like some aspect of it (see Figure 12-5).
FIGURE 12-5 Selecting a portion of the picture.
Note The webcam displayed by the CameraCaptureUI dialog is a full-screen camera.
Windows 8 also provides an alternative API that gives you full control over the streaming
done by the camera. By using this more advanced API, you can create custom views and
apply filters to captured data.
The captureFileAsync method returns control to the calling application as soon as the capture
operation completes. If a photo was taken, the promise passes an object that references the captured
item. Now you need to decide what you want to do with the captured item.
processing captured items
There are two things you probably want to do with the stream captured by the webcam: display the
image for the user and save the image to some permanent location, such as the Pictures library.
Search WWH ::

Custom Search