Gallery Video Picker
It is capacitor plugin that will help you to pick video path (duration, type, name, size) from gallery. You can also record video.
Android only support!
Installation
Use the package manager npm to install plugin.
npm install gallery-video-picker
Usage
import 'gallery-video-picker';
import { Plugins } from '@capacitor/plugin';
const { Camera } = Plugins;
const takeVideo = async () => {
const options = {
sizeLimit: 10,
source: PickerVideoType.CAMERA,
duration: 30,
quality: number,
};
const videoMetadata = Plugins.GalleryVideoPicker.getVideoFromGallery(options).then((result) => {
{
type: "video/mp4",
name: "example.mp4",
path: "file:///storage/**",
duration: 30,
size: 1277125
}
});
};
const requestPermission = async () => {
const options = {
permissionType: PickerVideoType.CAMERA,
};
const videoMetadata = Plugins.GalleryVideoPicker.getPermissions(options).then(
(res) =>
(err) =>
);
};
const openSettings = async () => {
const videoMetadata = await Plugins.GalleryVideoPicker.openSettings();
};
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
MIT