9
0
mirror of https://gitee.com/shuto/customCamera.git synced 2026-05-02 00:07:24 +08:00

Implémentation du flash dans le plugin JS.

This commit is contained in:
Christophe BOUCAUT
2015-02-03 11:52:29 +01:00
parent c713f3bab6
commit b927ad5158
3 changed files with 24 additions and 4 deletions
+8 -2
View File
@@ -7,6 +7,8 @@
// constructor.
function CustomCameraExport() {}
CustomCameraExport.prototype.FlashModes = {DISABLE: 0, ACTIVE: 1, AUTO: 2};
/**
* Start custom camera.
*
@@ -24,7 +26,9 @@
cameraBackgroundColorPressed: "#dc453d", // color of the pressed camera button.
// To get supported color formats, go to see method parseColor : http://developer.android.com/reference/android/graphics/Color.html#parseColor(java.lang.String)
quality: 100, // picture's quality : range 0 - 100 : http://developer.android.com/reference/android/graphics/Bitmap.html#compress(android.graphics.Bitmap.CompressFormat, int, java.io.OutputStream) (parameter "quality")
opacity: true // active or disable the opacity function.
opacity: true, // active or disable the opacity function.
defaultFlash: this.FlashModes.DISABLE, // default state for flash. Corrects values = 0 (disable) / 1 (active) / 2 (auto)
switchFlash: true // active or disable the switch flash button.
};
for (var nameOption in defaultOptions) {
@@ -54,7 +58,9 @@
options.cameraBackgroundColor,
options.cameraBackgroundColorPressed,
options.quality,
options.opacity
options.opacity,
options.defaultFlash,
options.switchFlash
]
);
};