@capgo/capacitor-flash 8.0.43 → 8.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
# capacitor-flash
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Turn the device flashlight on and off from your Capacitor app, with brightness control where the hardware allows it.
|
|
4
|
+
|
|
5
|
+
<a href="https://capgo.app/?ref=plugin_flash"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-flash" alt="Capgo - Instant updates for Capacitor" /></a>
|
|
3
6
|
|
|
4
7
|
<div align="center">
|
|
5
|
-
<
|
|
6
|
-
<h2><a href="https://capgo.app/
|
|
8
|
+
<p><b>Capgo</b>: open-source live updates for Ionic and Capacitor apps. Ship OTA fixes and features instantly, without waiting for app store review.</p>
|
|
9
|
+
<h2><a href="https://capgo.app/register/?ref=plugin_flash">➡️ Get started for free</a></h2>
|
|
10
|
+
<p>14-day unlimited free trial. No credit card required</p>
|
|
11
|
+
<p><a href="https://capgo.app/consulting/?ref=plugin_flash">Missing a feature? We'll build the plugin for you 💪</a></p>
|
|
7
12
|
</div>
|
|
8
|
-
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<img src="https://raw.githubusercontent.com/Cap-go/capacitor-flash/main/assets/github-social-preview.png" alt="@capgo/capacitor-flash for Capacitor apps" width="300" />
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
## Key features
|
|
19
|
+
|
|
20
|
+
- **On and off**: `switchOn({})`, `switchOff()` and `toggle()`.
|
|
21
|
+
- **Intensity**: pass `intensity` to `switchOn()` on supported devices.
|
|
22
|
+
- **State**: `isSwitchedOn()` reports whether the torch is on.
|
|
23
|
+
- **Availability**: `isAvailable()` checks for a flashlight first.
|
|
24
|
+
- **Platforms**: iOS, Android and Web. iOS uses AVFoundation, Android uses Camera2. Web uses the camera torch where the browser allows it.
|
|
9
25
|
|
|
10
26
|
## Why Capacitor Flash?
|
|
11
27
|
|
|
@@ -15,7 +15,7 @@ import com.getcapacitor.annotation.CapacitorPlugin;
|
|
|
15
15
|
@CapacitorPlugin(name = "CapacitorFlash")
|
|
16
16
|
public class CapacitorFlashPlugin extends Plugin {
|
|
17
17
|
|
|
18
|
-
private final String pluginVersion = "8.0.
|
|
18
|
+
private final String pluginVersion = "8.0.44";
|
|
19
19
|
|
|
20
20
|
private String cameraId;
|
|
21
21
|
boolean isFlashStateOn = false;
|
|
@@ -7,7 +7,7 @@ import Capacitor
|
|
|
7
7
|
*/
|
|
8
8
|
@objc(CapacitorFlashPlugin)
|
|
9
9
|
public class CapacitorFlashPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
-
private let pluginVersion: String = "8.0.
|
|
10
|
+
private let pluginVersion: String = "8.0.44"
|
|
11
11
|
public let identifier = "CapacitorFlashPlugin"
|
|
12
12
|
public let jsName = "CapacitorFlash"
|
|
13
13
|
public let pluginMethods: [CAPPluginMethod] = [
|