Skip to content

Commit

Permalink
docs: npm run docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz committed Jul 17, 2024
1 parent 67375d8 commit 835529e
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ npx cap sync

These configuration values are available:

| Prop | Type | Description | Default |
| --------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| **`enable`** | <code>boolean</code> | Configure whether the plugin should be enabled from startup. Only available for Android and iOS. | <code>true</code> |
| **`imageName`** | <code>string</code> | Configure whether the plugin should display a custom image from assets instead of a default background gray for the privacy screen. Only available for iOS. | <code>""</code> |
| **`contentMode`** | <code>string</code> | Configure the content mode of displayed image. Accepts values "center", "scaleToFill", "scaleAspectFit", "scaleAspectFill". Defaults to UIView.ContentMode.center in case of no value provided. Only available for iOS. | <code>""</code> |
| Prop | Type | Description | Default |
| ----------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| **`enable`** | <code>boolean</code> | Configure whether the plugin should be enabled from startup. Only available for Android and iOS. | <code>true</code> |
| **`imageName`** | <code>string</code> | Configure whether the plugin should display a custom image from assets instead of a default background gray for the privacy screen. Only available for iOS. | <code>""</code> |
| **`contentMode`** | <code>'center' \| 'scaleToFill' \| 'scaleAspectFit' \| 'scaleAspectFill'</code> | Configure the content mode of displayed image. Only available for iOS. | <code>"center"</code> |

### Examples

In `capacitor.config.json`:
Expand All @@ -63,7 +64,7 @@ In `capacitor.config.json`:
"PrivacyScreen": {
"enable": true,
"imageName": "Splashscreen",
"contentMode": "scaleAspectFill"
"contentMode": "scaleAspectFit"
}
}
}
Expand All @@ -81,7 +82,7 @@ const config: CapacitorConfig = {
PrivacyScreen: {
enable: true,
imageName: "Splashscreen",
contentMode: "scaleAspectFill"
contentMode: "scaleAspectFit",
},
},
};
Expand Down Expand Up @@ -162,7 +163,7 @@ Only available for Android and iOS.
### addListener('screenRecordingStarted', ...)

```typescript
addListener(eventName: 'screenRecordingStarted', listenerFunc: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: 'screenRecordingStarted', listenerFunc: () => void) => Promise<PluginListenerHandle>
```

Called when the screen recording is started.
Expand All @@ -174,7 +175,7 @@ Only available on iOS for now.
| **`eventName`** | <code>'screenRecordingStarted'</code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 3.0.2

Expand All @@ -184,7 +185,7 @@ Only available on iOS for now.
### addListener('screenRecordingStopped', ...)

```typescript
addListener(eventName: 'screenRecordingStopped', listenerFunc: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: 'screenRecordingStopped', listenerFunc: () => void) => Promise<PluginListenerHandle>
```

Called when the screen recording is stopped.
Expand All @@ -196,7 +197,7 @@ Only available on iOS for now.
| **`eventName`** | <code>'screenRecordingStopped'</code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 3.0.2

Expand All @@ -206,7 +207,7 @@ Only available on iOS for now.
### addListener('screenshotTaken', ...)

```typescript
addListener(eventName: 'screenshotTaken', listenerFunc: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: 'screenshotTaken', listenerFunc: () => void) => Promise<PluginListenerHandle>
```

Called when the screenshot is taken.
Expand All @@ -218,7 +219,7 @@ Only available on iOS for now.
| **`eventName`** | <code>'screenshotTaken'</code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 3.2.0

Expand Down

0 comments on commit 835529e

Please sign in to comment.