5.0.2 • Published 8 months ago

@whiteguru/capacitor-plugin-media-capture v5.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@whiteguru/capacitor-plugin-media-capture

Capacitor plugin to capture audio and video

Install

npm install @whiteguru/capacitor-plugin-media-capture
npx cap sync

or for Capacitor 3.x

npm install @whiteguru/capacitor-plugin-media-capture@3.0.1
npx cap sync

iOS

iOS not available jet

Android

This API requires the following permissions be added to your AndroidManifest.xml:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

Read about Setting Permissions in the Android Guide for more information on setting Android permissions.

Variables

This plugin needs compileSdkVersion = 31 variable (defined in your app's variables.gradle file)

API

captureVideo(...)

captureVideo(options: CaptureVideoOptions) => Promise<MediaFileResult>
ParamType
optionsCaptureVideoOptions

Returns: Promise<MediaFileResult>


Interfaces

MediaFileResult

PropType
fileMediaFile

MediaFile

PropTypeDescription
namestringThe name of the file, without path information.
pathstringThe full path of the file, including the name.
typestringThe file's mime type
sizenumberThe size of the file, in bytes.

CaptureVideoOptions

PropTypeDescription
durationnumberMaximum duration per video clip.
quality'uhd' | 'fhd' | 'hd' | 'sd'Quality of the video. uhd for 4K ultra HD video size (2160p). fhd for full HD video size (1080p). hd for HD video size (720p). sd for SD video size (480p).
sizeLimitnumberMax file size in bytes.
5.0.2

8 months ago

5.0.1

8 months ago

3.0.1

2 years ago

4.0.1

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago