@capacitor-community/video-recorder
CAPACITOR 5
VideoRecorderOptions
|
--------------------
### destroy()
```typescript
destroy() => PromiseVideoRecorderPreviewFrame
|
--------------------
### editPreviewFrameConfig(...)
```typescript
editPreviewFrameConfig(config: VideoRecorderPreviewFrame) => PromiseVideoRecorderPreviewFrame
|
--------------------
### switchToPreviewFrame(...)
```typescript
switchToPreviewFrame(options: { id: string; }) => Promise{ id: string; }
|
--------------------
### showPreviewFrame(...)
```typescript
showPreviewFrame(config: { position: number; quality: number; }) => Promise{ position: number; quality: number; }
|
--------------------
### hidePreviewFrame()
```typescript
hidePreviewFrame() => PromisePromise<{ videoUrl: string; }>
--------------------
### getDuration()
```typescript
getDuration() => Promise<{ value: number; }>
```
**Returns:** Promise<{ value: number; }>
--------------------
### addListener('onVolumeInput', ...)
```typescript
addListener(eventName: 'onVolumeInput', listenerFunc: (event: { value: number; }) => void) => Promise'onVolumeInput'
|
| **`listenerFunc`** | (event: { value: number; }) => void
|
**Returns:** Promise<PluginListenerHandle>
--------------------
### Interfaces
#### VideoRecorderOptions
| Prop | Type | Description | Default |
| ------------------- | --------------------------------------------------------------------- | ------------------------------ | -------------------- |
| **`camera`** | VideoRecorderCamera
| | |
| **`quality`** | VideoRecorderQuality
| | |
| **`autoShow`** | boolean
| | |
| **`previewFrames`** | VideoRecorderPreviewFrame[]
| | |
| **`videoBitrate`** | number
| The default bitrate is 4.5Mbps | 4500000
|
#### VideoRecorderPreviewFrame
| Prop | Type |
| ------------------- | ------------------------------------------------------------------- |
| **`id`** | string
|
| **`stackPosition`** | 'front' \| 'back'
|
| **`x`** | number
|
| **`y`** | number
|
| **`width`** | number \| 'fill'
|
| **`height`** | number \| 'fill'
|
| **`borderRadius`** | number
|
| **`dropShadow`** | { opacity?: number; radius?: number; color?: string; }
|
#### PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| **`remove`** | () => Promise<void>
|
### Enums
#### VideoRecorderCamera
| Members | Value |
| ----------- | -------------- |
| **`FRONT`** | 0
|
| **`BACK`** | 1
|
#### VideoRecorderQuality
| Members | Value |
| --------------- | -------------- |
| **`MAX_480P`** | 0
|
| **`MAX_720P`** | 1
|
| **`MAX_1080P`** | 2
|
| **`MAX_2160P`** | 3
|
| **`HIGHEST`** | 4
|
| **`LOWEST`** | 5
|
| **`QVGA`** | 6
|