mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-08-04 00:00:08 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f50132f78 |
@@ -30,9 +30,9 @@ export interface CameraPreviewOptions {
|
||||
|
||||
/** Preview box drag across the screen, default 'false' */
|
||||
previewDrag?: boolean;
|
||||
|
||||
/** Capture images to a file and return back the file path instead of returning base64 encoded data. Defaults to false */
|
||||
storeToFile?: boolean;
|
||||
|
||||
/** Capture images to a file and return back the file path instead of returning base64 encoded data. */
|
||||
storeToFile: boolean;
|
||||
|
||||
/** Preview box to the back of the webview (true => back, false => front) , default false */
|
||||
toBack?: boolean;
|
||||
@@ -166,19 +166,6 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
||||
CUSTOM: 'custom',
|
||||
};
|
||||
|
||||
WHITE_BALANCE_MODE = {
|
||||
LOCK: 'lock',
|
||||
AUTO: 'auto',
|
||||
CONTINUOUS: 'continuous',
|
||||
INCANDESCENT: 'incandescent',
|
||||
CLOUDY_DAYLIGHT: 'cloudy-daylight',
|
||||
DAYLIGHT: 'daylight',
|
||||
FLUORESCENT: 'fluorescent',
|
||||
SHADE: 'shade',
|
||||
TWILIGHT: 'twilight',
|
||||
WARM_FLUORESCENT: 'warm-fluorescent',
|
||||
};
|
||||
|
||||
FLASH_MODE = {
|
||||
OFF: 'off',
|
||||
ON: 'on',
|
||||
@@ -310,16 +297,6 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color effects supported by the camera device currently started. Android only.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSupportedColorEffects(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Set camera color effect.
|
||||
@@ -530,40 +507,6 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get white balance modes supported by the camera device currently started.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSupportedWhiteBalanceModes(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current white balance mode of the camera device currently started.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getWhiteBalanceMode(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the white balance mode for the camera device currently started.
|
||||
*
|
||||
* @param {string} [whiteBalanceMode] 'lock', 'auto', 'continuous', 'incandescent', 'cloudy-daylight', 'daylight', 'fluorescent', 'shade', 'twilight' or 'warm-fluorescent'
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
setWhiteBalanceMode(whiteBalanceMode?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set specific focus point. Note, this assumes the camera is full-screen.
|
||||
*
|
||||
@@ -605,18 +548,4 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
||||
getCameraCharacteristics(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a local file (e.g. a `file://` path returned by takePicture with storeToFile) into a Blob.
|
||||
*
|
||||
* @param {string} path the local url to convert
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
getBlob(path: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ export enum Connection {
|
||||
CELL_2G = '2g',
|
||||
CELL_3G = '3g',
|
||||
CELL_4G = '4g',
|
||||
CELL_5G = '5g',
|
||||
CELL = 'cellular',
|
||||
NONE = 'none',
|
||||
}
|
||||
@@ -62,7 +63,7 @@ export enum Connection {
|
||||
*
|
||||
* ```
|
||||
* @advanced
|
||||
* The `type` property will return one of the following connection types: `unknown`, `ethernet`, `wifi`, `2g`, `3g`, `4g`, `cellular`, `none`
|
||||
* The `type` property will return one of the following connection types: `unknown`, `ethernet`, `wifi`, `2g`, `3g`, `4g`, `5g`, `cellular`, `none`
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Network',
|
||||
@@ -83,6 +84,7 @@ export class Network extends AwesomeCordovaNativePlugin {
|
||||
CELL_2G: '2g',
|
||||
CELL_3G: '3g',
|
||||
CELL_4G: '4g',
|
||||
CELL_5G: '5g',
|
||||
CELL: 'cellular',
|
||||
NONE: 'none',
|
||||
};
|
||||
@@ -98,6 +100,7 @@ export class Network extends AwesomeCordovaNativePlugin {
|
||||
* Downlink Max Speed
|
||||
*
|
||||
* @returns {string}
|
||||
* @deprecated Not part of the upstream cordova-plugin-network-information API (verified against v3.1.0 types/index.d.ts and README). Retained for backwards compatibility only.
|
||||
*/
|
||||
@CordovaProperty() downlinkMax: string;
|
||||
|
||||
@@ -109,7 +112,7 @@ export class Network extends AwesomeCordovaNativePlugin {
|
||||
@CordovaCheck()
|
||||
onChange(): Observable<'connected' | 'disconnected'> {
|
||||
return merge(
|
||||
this.onConnect().pipe(mapTo('connected')),
|
||||
this.onConnect().pipe(mapTo('connected')) as Observable<'connected'>,
|
||||
this.onDisconnect().pipe(mapTo('disconnected')) as Observable<'disconnected'>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user