Library that enables video recording in native Capacitor apps using the built in vindeo recorder abilities on Android and iOS
npm install capacitor-video-recorder
npx cap sync
getVideo(...)
pickVideos(...)
checkPermissions()
requestPermissions(...)
- Interfaces
- Type Aliases
- Enums
getVideo(options: VideoOptions) => Promise<Video>
Prompt the user to pick a video from an album, or take a new video with the camera.
Param | Type |
---|---|
options |
VideoOptions |
Returns: Promise<Video>
Since: 0.0.1
pickVideos(options: GalleryVideoOptions) => Promise<Videos>
Allows the user to pick multiple videos from the gallery. On iOS 13 and older it only allows to pick one video.
Param | Type |
---|---|
options |
GalleryVideoOptions |
Returns: Promise<Videos>
Since: 0.0.1
checkPermissions() => Promise<PermissionStatus>
Check camera and video album permissions
Returns: Promise<PermissionStatus>
Since: 0.0.1
requestPermissions(permissions?: VideoRecorderPluginPermissions | undefined) => Promise<PermissionStatus>
Request camera and video album permissions
Param | Type |
---|---|
permissions |
VideoRecorderPluginPermissions |
Returns: Promise<PermissionStatus>
Since: 0.0.1
Prop | Type | Description | Since |
---|---|---|---|
path |
string |
If using CameraResultType.Uri, the path will contain a full, platform-specific file URL that can be read later using the Filesystem API. | 0.0.1 |
webPath |
string |
webPath returns a path that can be used to set the src attribute of an video for efficient loading and rendering. | 0.0.1 |
Prop | Type | Description | Default | Since |
---|---|---|---|---|
source |
VideoSource |
The source to get the video from. By default this prompts the user to select either the video album or take a video. | : VideoSource.Prompt |
0.0.1 |
Prop | Type | Description | Since |
---|---|---|---|
photos |
Video[] |
Array of all the picked videos. | 0.0.1 |
Prop | Type | Description | Default | Since |
---|---|---|---|---|
presentationStyle |
'fullscreen' | 'popover' |
iOS only: The presentation style of the Camera. | : 'fullscreen' |
0.0.1 |
limit |
number |
iOS only: Maximum number of videos the user will be able to choose. | 0 (unlimited) |
0.0.1 |
Prop | Type |
---|---|
camera |
VideoPermissionState |
photos |
VideoPermissionState |
Prop | Type |
---|---|
permissions |
VideoPermissionType[] |
PermissionState | 'limited'
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'
'camera' | 'videos'
Members | Value | Description |
---|---|---|
Prompt |
"PROMPT" |
Prompts the user to select either the video album or take a video. |
Camera |
"CAMERA" |
Take a new video using the camera. |
Videos |
"VIDEOS" |
Pick an existing video from the gallery or video album. |