You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h4align="center">A NativeScript camera with all the bells and whistles which can be embedded inside a view. This plugin was sponsored by <ahref="https://liveshopper.com">LiveShopper<a></h4>
4
+
<h4align="center">A NativeScript camera with all the bells and whistles which can be embedded inside a view. This plugin was sponsored by LiveShopper</h4>
|**debug**| boolean | If true logs will be output in the console to help debug the Camera Plus events. |
86
88
|**confirmPhotos**| boolean | If true the default take picture event will present a confirmation dialog before saving. Default is true. |
89
+
|**confirmRetakeText**| string | When confirming capture this text will be presented to the user to retake the photo. Default is 'Retake' |
90
+
|**confirmSaveText**| string | When confirming capture this text will be presented to the user to save the photo. Default is 'Save' |
87
91
|**saveToGallery**| boolean | If true the default take picture event will save to device gallery. Default is true. |
88
92
|**galleryPickerMode**| string | The gallery/library selection mode. 'single' allows one image to be selected. 'multiple' allows multiple images. Default is 'multiple' |
89
93
|**showFlashIcon**| boolean | If true the default flash toggle icon/button will show on the Camera Plus layout. Default is true. |
@@ -92,6 +96,14 @@ npm run demo.ng.android.device
92
96
|**showGalleryIcon**| boolean | If true the choose from gallery/library icon/button will show on the Camera Plus layout. Default is true. |
93
97
|**enableVideo**| boolean | If true the CameraPlus instance can record video. |
94
98
99
+
## Static Properties
100
+
_Note: These properties need set before the initialization of the camera. Users should set these in a component constructor before their view creates the component if the wish to change the default values._
|**enableVideo**| boolean | Video Support (off by default). Can reset it before using in different views if they want to go back/forth between photo/camera and video/camera |
105
+
|**defaultCamera**| CameraTypes | Defaults the camera correctly on launch. Default `'rear'`. `'front'` or `'rear'`|
106
+
95
107
## Android Only Properties
96
108
97
109
| Name | Type | Description |
@@ -117,14 +129,14 @@ npm run demo.ng.android.device
117
129
|**toggleFlash()**| Toggles the flash mode on the active camera. |
118
130
|**toggleCamera()**| Toggles the active camera on the device. |
119
131
|**chooseFromLibrary(opts?: IChooseOptions)**| Opens the device gallery (image library) for selecting images. |
120
-
|**takePicture()**| Takes a picture of the current preview in the CameraPlus. |
121
-
|**getFlashMode(): string**| Android: various strings possible: https://developer.android.com/reference/android/hardware/Camera.Parameters.html#getFlashMode() iOS: either 'on' or 'off' |
132
+
|**takePicture(opts?: ICaptureOptions)**| Takes a picture of the current preview in the CameraPlus. |
133
+
|**getFlashMode(): string**| Android: various strings possible: https://developer.android.com/reference/android/hardware/Camera.Parameters.html#getFlashMode() iOS: either `'on'` or `'off'`|
122
134
|**record(opts?: IVideoOptions)**| Starts recording a video. |
123
135
|**stop()**| Stops the video recording, when stopped the `videoRecordingReadyEvent` event will be emitted. |
|**requestCameraPermissions(explanationText?: string)**| Prompts the user to grant runtime permission to use the device camera. Returns a Promise<boolean>. |
130
142
|**hasCameraPermission()**| Returns true if the application has been granted access to the device camera. |
@@ -137,6 +149,41 @@ npm run demo.ng.android.device
0 commit comments