Search docs/
Getting StartedPlugins

Media Capture

This plugin provides access to the device's audio, image, and video capture capabilities.

Requires Cordova plugin: cordova-plugin-media-capture. For more info, please see the Media Capture plugin docs.

https://github.com/apache/cordova-plugin-media-capture

Premier Version Available

Featuring regular release cycles, security and bug fixes, and guaranteed SLAs.

Available here

Installation

ionic cordova plugin add cordova-plugin-media-capturenpm install @ionic-native/media-capturenpm install cordova-plugin-media-capturenpm install @ionic-native/media-captureionic cap sync
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android
  • Browser
  • iOS
  • Windows

Usage

React

See here.

Angular

import { MediaCapture, MediaFile, CaptureError, CaptureImageOptions } from '@ionic-native/media-capture/ngx';


constructor(private mediaCapture: MediaCapture) { }

...


let options: CaptureImageOptions = { limit: 3 }
this.mediaCapture.captureImage(options)
  .then(
    (data: MediaFile[]) => console.log(data),
    (err: CaptureError) => console.error(err)
  );