# cordova-plugin-screenrecord

> using MediaRecorder or MediaMuxer to record Android device's screen

Latest version **0.0.5** (published 2018-11-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-screenrecord
pnpm add cordova-plugin-screenrecord
yarn add cordova-plugin-screenrecord
bun add cordova-plugin-screenrecord
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2018-11-28 |
| First published | 2017-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | charles0427 |
| Maintainers | charles0427 |
| Keywords | ecosystem:cordova, cordova-android |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-screenrecord
- Repository: https://github.com/monkeyDledger/cordova-plugin-screenrecord
- Homepage: https://github.com/monkeyDledger/cordova-plugin-screenrecord#readme
- Issues: https://github.com/monkeyDledger/cordova-plugin-screenrecord/issues
- npm.io page: https://npm.io/package/cordova-plugin-screenrecord

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2018-11-28
- 0.0.4 — 2017-09-05
- 0.0.3 — 2017-09-04
- 0.0.2 — 2017-08-29
- 0.0.1 — 2017-08-24

## README

# cordova-plugin-screenrecord

**cordova plugin, support Android**

[![NPM](https://nodei.co/npm/cordova-plugin-screenrecord.png?compact=true)](https://nodei.co/npm/cordova-plugin-screenrecord/)

using MediaRecorder or MediaMuxer to record Android device's screen

## Installation

`cordova plugin add cordova-plugin-screenrecord --save`

## Api Reference
### [ScreenRecord.startRecord(options, filePath, success, error)]()
* options, Object

| Name | Type | Default | Description |
| ---  | :---:  | :---:     | :---: |
| isAudio | boolean | false | If true, the plugin uses MediaRecorder to record audio & video |
| width  | number | 720 |width in pixels to record screen |
| height | number | 1280 |height in pixels to record screen |
| bitRate| number | 6000000 | the bit rate of video |
| dpi | number| 1 | the dpi of video  |

* filePath,  String

the full absolute path of the video file

**example:** `/sdcard/yourapp/test.mp4`

* success,  Function

Callback function that provides a message when the screen-record process started

After the screen-record process started, the java will call `cordova.getActivity().moveTaskToBack(true)`

* error,  Function

Callback function that provides a error message

### [ScreenRecord.stopRecord(success, error)]()
stop a running screen-record process 
* success,  Function

Callback function that provide a message when stop a running process

* error,  Function

Callback function that provide a error message.

## Ionic2 Example

use this plugin in ionic2 project

1. `ionic plugin add cordova-plugin-screenrecord`
2. `declare var ScreenRecord` in `declarations.d.ts`
3.  using `ScreenRecord` in your .ts file

---
_Source: https://npm.io/package/cordova-plugin-screenrecord · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
