# cordova-plugin-screen-recording

> Cordova plugin for Android Screen Recording

Latest version **1.0.2** (published 2022-01-16) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-screen-recording
pnpm add cordova-plugin-screen-recording
yarn add cordova-plugin-screen-recording
bun add cordova-plugin-screen-recording
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-01-16 |
| First published | 2022-01-16 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 41.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Miloš Petrašinović |
| Maintainers | mpetrasinovic |
| Keywords | ecosystem:cordova, cordova-android |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-screen-recording
- Repository: https://github.com/PR-DC/cordova-plugin-screen-recording
- Homepage: https://github.com/PR-DC/cordova-plugin-screen-recording#readme
- Issues: https://github.com/PR-DC/cordova-plugin-screen-recording/issues
- npm.io page: https://npm.io/package/cordova-plugin-screen-recording

## 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

- 1.0.2 (latest) — 2022-01-16

## README

## PR-DC cordova-plugin-screen-recording

Cordova plugin for Android Screen Recording (Screen Capture). This plugin makes it possible to save screen-recording as a video to the device's gallery, it requests neccery permissions when the user starts recording for the first time and creates a notification that is active while the screen is being recorded.

## Requirements
[Apache Cordova](https://cordova.apache.org/)<br>

This library is tested with
**Cordova Android 9.1.0**

## Installation
From the root folder of your Cordova project, run:
```
cordova plugin add https://github.com/PR-DC/cordova-plugin-screen-recording.git
```

## Usage
First, append the following preference to the project's `config.xml` document.
```xml
<preference name="AndroidXEnabled" value="true" />
```

Now you can proceed with the app code, start recording with:
```js
ScreenRecord.startRecord(opts, fileName, function success(), function error());
```
`opts` is a JSON object with the following properties:

- `recordAudio`: whether to record audio or not, defaults to `false`
- `bitRate`: video bitrate, defaults to `6000000`
- `title`: notification title, defaults to `Screen Recording`
- `text`: notification text, defaults to `Screen recording active...`

To stop recording call the following method:
```js
ScreenRecord.stopRecord(function success(), function error());
```
When recording is stopped video is saved to memory and then you can play the video from the gallery.

## Example of Cordova application

An example of Cordova application that uses cordova-plugin-screen-recording is available at: https://github.com/PR-DC/PRDC_TestScreenRecording

## License
Copyright (C) 2022 PR-DC <info@pr-dc.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as 
published by the Free Software Foundation, either version 3 of the 
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

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