CB-10552 Replacing images in README.md.
This commit is contained in:
parent
16636d18f2
commit
f792aaacc3
46
README.md
46
README.md
@ -71,20 +71,20 @@ Documentation consists of template and API docs produced from the plugin JS code
|
|||||||
|
|
||||||
|
|
||||||
* [camera](#module_camera)
|
* [camera](#module_camera)
|
||||||
* [.getPicture(successCallback, errorCallback, options)](#module_camera.getPicture)
|
* [.getPicture(successCallback, errorCallback, options)](#module_camera.getPicture)
|
||||||
* [.cleanup()](#module_camera.cleanup)
|
* [.cleanup()](#module_camera.cleanup)
|
||||||
* [.onError](#module_camera.onError) : <code>function</code>
|
* [.onError](#module_camera.onError) : <code>function</code>
|
||||||
* [.onSuccess](#module_camera.onSuccess) : <code>function</code>
|
* [.onSuccess](#module_camera.onSuccess) : <code>function</code>
|
||||||
* [.CameraOptions](#module_camera.CameraOptions) : <code>Object</code>
|
* [.CameraOptions](#module_camera.CameraOptions) : <code>Object</code>
|
||||||
|
|
||||||
|
|
||||||
* [Camera](#module_Camera)
|
* [Camera](#module_Camera)
|
||||||
* [.DestinationType](#module_Camera.DestinationType) : <code>enum</code>
|
* [.DestinationType](#module_Camera.DestinationType) : <code>enum</code>
|
||||||
* [.EncodingType](#module_Camera.EncodingType) : <code>enum</code>
|
* [.EncodingType](#module_Camera.EncodingType) : <code>enum</code>
|
||||||
* [.MediaType](#module_Camera.MediaType) : <code>enum</code>
|
* [.MediaType](#module_Camera.MediaType) : <code>enum</code>
|
||||||
* [.PictureSourceType](#module_Camera.PictureSourceType) : <code>enum</code>
|
* [.PictureSourceType](#module_Camera.PictureSourceType) : <code>enum</code>
|
||||||
* [.PopoverArrowDirection](#module_Camera.PopoverArrowDirection) : <code>enum</code>
|
* [.PopoverArrowDirection](#module_Camera.PopoverArrowDirection) : <code>enum</code>
|
||||||
* [.Direction](#module_Camera.Direction) : <code>enum</code>
|
* [.Direction](#module_Camera.Direction) : <code>enum</code>
|
||||||
|
|
||||||
* [CameraPopoverHandle](#module_CameraPopoverHandle)
|
* [CameraPopoverHandle](#module_CameraPopoverHandle)
|
||||||
* [CameraPopoverOptions](#module_CameraPopoverOptions)
|
* [CameraPopoverOptions](#module_CameraPopoverOptions)
|
||||||
@ -97,11 +97,11 @@ Documentation consists of template and API docs produced from the plugin JS code
|
|||||||
### camera.getPicture(successCallback, errorCallback, options)
|
### camera.getPicture(successCallback, errorCallback, options)
|
||||||
Takes a photo using the camera, or retrieves a photo from the device's
|
Takes a photo using the camera, or retrieves a photo from the device's
|
||||||
image gallery. The image is passed to the success callback as a
|
image gallery. The image is passed to the success callback as a
|
||||||
base64-encoded `String`, or as the URI for the image file.
|
base64-encoded `String`, or as the URI for the image file.
|
||||||
|
|
||||||
The `camera.getPicture` function opens the device's default camera
|
The `camera.getPicture` function opens the device's default camera
|
||||||
application that allows users to snap pictures by default - this behavior occurs,
|
application that allows users to snap pictures by default - this behavior occurs,
|
||||||
when `Camera.sourceType` equals [`Camera.PictureSourceType.CAMERA`](#module_Camera.PictureSourceType).
|
when `Camera.sourceType` equals [`Camera.PictureSourceType.CAMERA`](#module_Camera.PictureSourceType).
|
||||||
Once the user snaps the photo, the camera application closes and the application is restored.
|
Once the user snaps the photo, the camera application closes and the application is restored.
|
||||||
|
|
||||||
If `Camera.sourceType` is `Camera.PictureSourceType.PHOTOLIBRARY` or
|
If `Camera.sourceType` is `Camera.PictureSourceType.PHOTOLIBRARY` or
|
||||||
@ -136,11 +136,17 @@ than `DATA_URL`.
|
|||||||
|
|
||||||
__Supported Platforms__
|
__Supported Platforms__
|
||||||
|
|
||||||
        
|
- Android
|
||||||
|
- BlackBerry
|
||||||
|
- Browser
|
||||||
|
- Firefox
|
||||||
|
- FireOS
|
||||||
|
- iOS
|
||||||
|
- Windows
|
||||||
|
- WP8
|
||||||
|
- Ubuntu
|
||||||
|
|
||||||
* [More examples](#camera-getPicture-examples)
|
More examples [here](#camera-getPicture-examples). Quirks [here](#camera-getPicture-quirks).
|
||||||
|
|
||||||
* [Quirks](#camera-getPicture-quirks)
|
|
||||||
|
|
||||||
**Kind**: static method of <code>[camera](#module_camera)</code>
|
**Kind**: static method of <code>[camera](#module_camera)</code>
|
||||||
|
|
||||||
@ -163,7 +169,7 @@ after calling [`camera.getPicture`](#module_camera.getPicture). Applies only whe
|
|||||||
|
|
||||||
__Supported Platforms__
|
__Supported Platforms__
|
||||||
|
|
||||||
        
|
- iOS
|
||||||
|
|
||||||
**Kind**: static method of <code>[camera](#module_camera)</code>
|
**Kind**: static method of <code>[camera](#module_camera)</code>
|
||||||
**Example**
|
**Example**
|
||||||
@ -331,12 +337,12 @@ A handle to an image picker popover.
|
|||||||
|
|
||||||
__Supported Platforms__
|
__Supported Platforms__
|
||||||
|
|
||||||
        
|
- iOS
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```js
|
```js
|
||||||
var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail,
|
var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail,
|
||||||
{
|
{
|
||||||
destinationType: Camera.DestinationType.FILE_URI,
|
destinationType: Camera.DestinationType.FILE_URI,
|
||||||
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
|
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
|
||||||
popoverOptions: new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY)
|
popoverOptions: new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY)
|
||||||
|
@ -25,7 +25,7 @@ var argscheck = require('cordova/argscheck'),
|
|||||||
// XXX: commented out
|
// XXX: commented out
|
||||||
//CameraPopoverHandle = require('./CameraPopoverHandle');
|
//CameraPopoverHandle = require('./CameraPopoverHandle');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @namespace navigator
|
* @namespace navigator
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -80,37 +80,37 @@ for (var key in Camera) {
|
|||||||
/**
|
/**
|
||||||
* @description Takes a photo using the camera, or retrieves a photo from the device's
|
* @description Takes a photo using the camera, or retrieves a photo from the device's
|
||||||
* image gallery. The image is passed to the success callback as a
|
* image gallery. The image is passed to the success callback as a
|
||||||
* base64-encoded `String`, or as the URI for the image file.
|
* base64-encoded `String`, or as the URI for the image file.
|
||||||
*
|
*
|
||||||
* The `camera.getPicture` function opens the device's default camera
|
* The `camera.getPicture` function opens the device's default camera
|
||||||
* application that allows users to snap pictures by default - this behavior occurs,
|
* application that allows users to snap pictures by default - this behavior occurs,
|
||||||
* when `Camera.sourceType` equals [`Camera.PictureSourceType.CAMERA`]{@link module:Camera.PictureSourceType}.
|
* when `Camera.sourceType` equals [`Camera.PictureSourceType.CAMERA`]{@link module:Camera.PictureSourceType}.
|
||||||
* Once the user snaps the photo, the camera application closes and the application is restored.
|
* Once the user snaps the photo, the camera application closes and the application is restored.
|
||||||
*
|
*
|
||||||
* If `Camera.sourceType` is `Camera.PictureSourceType.PHOTOLIBRARY` or
|
* If `Camera.sourceType` is `Camera.PictureSourceType.PHOTOLIBRARY` or
|
||||||
* `Camera.PictureSourceType.SAVEDPHOTOALBUM`, then a dialog displays
|
* `Camera.PictureSourceType.SAVEDPHOTOALBUM`, then a dialog displays
|
||||||
* that allows users to select an existing image. The
|
* that allows users to select an existing image. The
|
||||||
* `camera.getPicture` function returns a [`CameraPopoverHandle`]{@link module:CameraPopoverHandle} object,
|
* `camera.getPicture` function returns a [`CameraPopoverHandle`]{@link module:CameraPopoverHandle} object,
|
||||||
* which can be used to reposition the image selection dialog, for
|
* which can be used to reposition the image selection dialog, for
|
||||||
* example, when the device orientation changes.
|
* example, when the device orientation changes.
|
||||||
*
|
*
|
||||||
* The return value is sent to the [`cameraSuccess`]{@link module:camera.onSuccess} callback function, in
|
* The return value is sent to the [`cameraSuccess`]{@link module:camera.onSuccess} callback function, in
|
||||||
* one of the following formats, depending on the specified
|
* one of the following formats, depending on the specified
|
||||||
* `cameraOptions`:
|
* `cameraOptions`:
|
||||||
*
|
*
|
||||||
* - A `String` containing the base64-encoded photo image.
|
* - A `String` containing the base64-encoded photo image.
|
||||||
*
|
*
|
||||||
* - A `String` representing the image file location on local storage (default).
|
* - A `String` representing the image file location on local storage (default).
|
||||||
*
|
*
|
||||||
* You can do whatever you want with the encoded image or URI, for
|
* You can do whatever you want with the encoded image or URI, for
|
||||||
* example:
|
* example:
|
||||||
*
|
*
|
||||||
* - Render the image in an `<img>` tag, as in the example below
|
* - Render the image in an `<img>` tag, as in the example below
|
||||||
*
|
*
|
||||||
* - Save the data locally (`LocalStorage`, [Lawnchair](http://brianleroux.github.com/lawnchair/), etc.)
|
* - Save the data locally (`LocalStorage`, [Lawnchair](http://brianleroux.github.com/lawnchair/), etc.)
|
||||||
*
|
*
|
||||||
* - Post the data to a remote server
|
* - Post the data to a remote server
|
||||||
*
|
*
|
||||||
* __NOTE__: Photo resolution on newer devices is quite good. Photos
|
* __NOTE__: Photo resolution on newer devices is quite good. Photos
|
||||||
* selected from the device's gallery are not downscaled to a lower
|
* selected from the device's gallery are not downscaled to a lower
|
||||||
* quality, even if a `quality` parameter is specified. To avoid common
|
* quality, even if a `quality` parameter is specified. To avoid common
|
||||||
@ -119,11 +119,18 @@ for (var key in Camera) {
|
|||||||
*
|
*
|
||||||
* __Supported Platforms__
|
* __Supported Platforms__
|
||||||
*
|
*
|
||||||
*         
|
* - Android
|
||||||
|
* - BlackBerry
|
||||||
|
* - Browser
|
||||||
|
* - Firefox
|
||||||
|
* - FireOS
|
||||||
|
* - iOS
|
||||||
|
* - Windows
|
||||||
|
* - WP8
|
||||||
|
* - Ubuntu
|
||||||
*
|
*
|
||||||
* * [More examples](#camera-getPicture-examples)
|
* More examples [here](#camera-getPicture-examples). Quirks [here](#camera-getPicture-quirks).
|
||||||
*
|
*
|
||||||
* * [Quirks](#camera-getPicture-quirks)
|
|
||||||
* @example
|
* @example
|
||||||
* navigator.camera.getPicture(cameraSuccess, cameraError, cameraOptions);
|
* navigator.camera.getPicture(cameraSuccess, cameraError, cameraOptions);
|
||||||
* @param {module:camera.onSuccess} successCallback
|
* @param {module:camera.onSuccess} successCallback
|
||||||
@ -164,11 +171,11 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
|
|||||||
*
|
*
|
||||||
* __Supported Platforms__
|
* __Supported Platforms__
|
||||||
*
|
*
|
||||||
*         
|
* - iOS
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* navigator.camera.cleanup(onSuccess, onFail);
|
* navigator.camera.cleanup(onSuccess, onFail);
|
||||||
*
|
*
|
||||||
* function onSuccess() {
|
* function onSuccess() {
|
||||||
* console.log("Camera cleanup success.")
|
* console.log("Camera cleanup success.")
|
||||||
* }
|
* }
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
var exec = require('cordova/exec');
|
var exec = require('cordova/exec');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @namespace navigator
|
* @namespace navigator
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -30,16 +30,16 @@ var exec = require('cordova/exec');
|
|||||||
*
|
*
|
||||||
* __Supported Platforms__
|
* __Supported Platforms__
|
||||||
*
|
*
|
||||||
*         
|
* - iOS
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail,
|
* var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail,
|
||||||
* {
|
* {
|
||||||
* destinationType: Camera.DestinationType.FILE_URI,
|
* destinationType: Camera.DestinationType.FILE_URI,
|
||||||
* sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
|
* sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
|
||||||
* popoverOptions: new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY)
|
* popoverOptions: new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY)
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* // Reposition the popover if the orientation changes.
|
* // Reposition the popover if the orientation changes.
|
||||||
* window.onorientationchange = function() {
|
* window.onorientationchange = function() {
|
||||||
* var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY);
|
* var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user