Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Assets Update Camera sample Oct 30, 2017
Assets.ux Update Camera sample Oct 30, 2017
CameraViewExample.unoproj Update Camera sample Oct 30, 2017
CaptureMode.ux Update Camera sample Oct 30, 2017
CapturePhotoButton.ux Update Camera sample Oct 30, 2017
CaptureVideoButton.ux Update Camera sample Oct 30, 2017
FlashMode.ux Update Camera sample Oct 30, 2017
MainView.ux Update Camera sample Oct 30, 2017
README.md Fix to readme Nov 17, 2017

README.md

Camera

This example uses the Fuse.Controls.Camera premium package

Basic Camera use is simple:

<CameraView ux:Name="_camera" />
<JavaScript>
	var Camera = _camera;
	Camera.capturePhoto()
		.then(function(photo) {
			photo.save()
				.then(function(filePath) {
					console.log("Photo saved to: " + filePath);
					photo.release();
				})
				.catch(function(error) {
					console.log("Failed to save photo: " + error);
					photo.release();
				});
		})
		.catch(function(error) {
			console.log("Failed to capture photo: " + error);
		});
</JavaScript>

capturePhoto returns a Promise that will resolve to an object representing the captured photo. We can then save the photo to a file on disk. save() will return a Promise that resolves to a filepath.

Camera features implemented in this example

  • Photo capture
  • Capture preview with the special ImageSource provided by in the Camera API
  • Video recording and preview.
  • Changing capture mode
  • Changing flash mode
  • Dealing with Android specific photo settings

Please have a look at the official docs for complete API reference here.