mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Update Readme.md
This commit is contained in:
@ -1,14 +1 @@
|
||||
Sample usage:
|
||||
```
|
||||
var camera = require("camera");
|
||||
|
||||
camera.takePicture({"width": 300, "height": 300, "keepAspectRatio": true, "saveToGallery": true}).then(function (image) {
|
||||
console.log('pic taken - width: ' + image.width + ", height: " + image.height);
|
||||
}).fail(function (error) {
|
||||
console.log('pic canceled');
|
||||
});
|
||||
|
||||
if(camera.isAvailable()){
|
||||
console.log('you may take a picture');
|
||||
}
|
||||
```
|
||||
Allows you to take pictrues with the device's camera.
|
||||
|
Reference in New Issue
Block a user