FuseJS/Camera Module (JS)
Allows the capture of still images from the system camera.
Images are returned as frozen JavaScript Image objects, consisting of a path, a filename, a width and a height. Once created or acquired, Images can be passed around to other APIs to use, fetch or alter their underlying data. All images are temporary "scratch images" until storage has been specified either through publishing to the CameraRoll or other.
You need to add a reference to "Fuse.Camera"
in your project file to use this feature.
On Android using this API will request the CAMERA and WRITE_EXTERNAL_STORAGE permissions.
Example
var camera = require('FuseJS/Camera');
camera.takePicture(640,480).then(function(image)
{
//Do things with image here
}).catch(function(error) {
//Something went wrong, see error for details
});
Location
- Namespace
- Fuse.Camera
- Package
- Fuse.Camera 2.9.1
Interface of Camera
checkPermissions() js
Checks if device has permissions to access the camera.
requestPermissions() js
Requests acccess to the camera
takePicture([desiredWidth, desiredHeight]) js
Inherited from NativeModule
AddMember(NativeMember) uno
Reset : EventHandler (object, EventArgs) ux
Inherited from Module
Dispose uno
Evaluate(Context, ModuleResult) uno
Evaluate(Context, string) : ModuleResult uno
Evaluated : EventHandler (object, EventArgs) ux
EvaluateExports(Context, string) : object uno
GetFile : FileSource uno
Returns the file source that will be watched by the Context for changes in Fuse preview. Override in subclasses and return correct file source to support live updates in Fuse preview.