apache / apache/cordova-plugin-camera

Add support for recording video

Open
#816 8 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Objective-C
Stars
976
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

# Feature Request

## Motivation Behind Feature

Currently to build an app that can take pictures and record video, a user has to use a camera specific plugin such as this one and a separate video recording plugin such as @awesome-cordova-plugins/media-capture. These plugins do not operate in too similar a fashion when recording and storing media. It would be very convenient and useful to have both picture and video recording capabilities in one plugin and this camera plugin already has a lot of great configurable options.

## Feature Description

* Add a new method to the `camera` class called `getVideo(successCallback, errorCallback, options)` that accepts similar parameters to the `getPicture` method including the CameraOptions object.
* Allow video to be stored to temporary app storage using the `saveToPhotoAlbum` boolean option.
* Potentially extend the CameraOptions interface for video specific options if necessary.

## Alternatives or Workarounds

Two plugins are required at this time to have both picture and video recording functionality (@awesome-cordova-plugins/camera and @awesome-cordova-plugins/media-capture for example).

This camera plugin gives great options for recording and storing pictures, particularly allowing the developer to save the image file to temporary app storage with the `saveToPhotoAlbum` camera option. _Something to note, there is a mediaType for VIDEO in the cameraOptions but it does not do what it seems like it should do and captures/stores an image file._

The media-capture plugin is an option for recording video but it lacks a few of the useful features that the camera plugin offers. Namely it has less options and doesn't allow the user to store the video file anywhere other than the photo gallery.

Contributor guide

Open the contributing guide

Research direction

Start with the camera class and the existing getPicture method, then compare the camera plugin with @awesome-cordova-plugins/media-capture. Trace how CameraOptions, mediaType VIDEO, and saveToPhotoAlbum are currently handled on the Objective-C, Java, and JavaScript sides. Done means video recording, temporary storage, and photo-album storage work consistently through getVideo with appropriate options.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript, objective-c
Domain
mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.