ensemble-ios-video-recorder
v5.0.0
Published
Allows video preview, capture, flip camera, etc. on ios devices with a mobile focus.
Maintainers
Readme
ensemble-ios-video-recorder
Allows video preview, capture, flip camera, etc. on ios devices with a mobile focus.
Install
npm install ensemble-ios-video-recorder
npx cap syncAPI
initialize(...)destroy()flipCamera()addPreviewFrameConfig(...)editPreviewFrameConfig(...)switchToPreviewFrame(...)showPreviewFrame()hidePreviewFrame()prepareRecording(...)startRecording(...)stopRecording()listAudioInputs()selectAudioInputAsActive(...)toggleFlashTorch()- Interfaces
- Enums
initialize(...)
initialize(options?: VideoRecorderOptions | undefined) => Promise<void>| Param | Type |
| ------------- | --------------------------------------------------------------------- |
| options | VideoRecorderOptions |
destroy()
destroy() => Promise<void>flipCamera()
flipCamera() => Promise<void>addPreviewFrameConfig(...)
addPreviewFrameConfig(config: VideoRecorderPreviewFrame) => Promise<void>| Param | Type |
| ------------ | ------------------------------------------------------------------------------- |
| config | VideoRecorderPreviewFrame |
editPreviewFrameConfig(...)
editPreviewFrameConfig(config: VideoRecorderPreviewFrame) => Promise<void>| Param | Type |
| ------------ | ------------------------------------------------------------------------------- |
| config | VideoRecorderPreviewFrame |
switchToPreviewFrame(...)
switchToPreviewFrame(options: { id: string; }) => Promise<void>| Param | Type |
| ------------- | ---------------------------- |
| options | { id: string; } |
showPreviewFrame()
showPreviewFrame() => Promise<void>hidePreviewFrame()
hidePreviewFrame() => Promise<void>prepareRecording(...)
prepareRecording(options: { outputFileStem: string; projectUUID: string; }) => Promise<string>| Param | Type |
| ------------- | ------------------------------------------------------------- |
| options | { outputFileStem: string; projectUUID: string; } |
Returns: Promise<string>
startRecording(...)
startRecording(options: { outputFileStem: string; projectUUID: string; }) => Promise<void>| Param | Type |
| ------------- | ------------------------------------------------------------- |
| options | { outputFileStem: string; projectUUID: string; } |
stopRecording()
stopRecording() => Promise<{ videoUrl: string; audioUrl: string; }>Returns: Promise<{ videoUrl: string; audioUrl: string; }>
listAudioInputs()
listAudioInputs() => Promise<{ data: { uid: string; portName: string; portType: string; active: boolean; }[]; }>Returns: Promise<{ data: { uid: string; portName: string; portType: string; active: boolean; }[]; }>
selectAudioInputAsActive(...)
selectAudioInputAsActive(options: { uid: string; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------- |
| options | { uid: string; } |
toggleFlashTorch()
toggleFlashTorch() => Promise<void>Interfaces
VideoRecorderOptions
| Prop | Type |
| ------------------- | --------------------------------------------------------------------- |
| id | string |
| camera | VideoRecorderCamera |
| quality | VideoRecorderQuality |
| autoShow | boolean |
| previewFrames | VideoRecorderPreviewFrame[] |
| stackPosition | 'front' | 'back' |
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; } |
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 |
